title: Check Status Code C#
body: <p>I need a way to run some if statements based on the status code that is returned after a request. For example, if a 400 error returns, I would like to redirect to a login page. I need some ideas on how to check the status code and include that information in an if statement. So something like </p>
  
  <p>If () 
  { </p>
  
  <p>} 
  else 
  {</p>
  
  <p>} </p>
  
  <p>I just need the write-up to include in my if.  </p>