title: How to split text box value and check whether it is email ID or plain text in c#
body: <p>I have a text box(txt_to) which has values seperated by ; How can I split the values, and even if there is only one value the code should not through error.</p>
  
  <p>I tried to split it with the following code but got an error</p>
  
  <pre><code>string[] recipients = Request.Form["txt_to"].Split(';');
  Object reference not set to an instance of an object.
  </code></pre>
  
  <p>The values in the text box are either a email like (abc@aaa.com) or just a plain text like (Ios Group). the values in the text box are like abc@aaa.com; Ios Group. How to split the value and how to check whether it is email id or just a plain text</p>
  
  <pre><code>if(email id)
  {
  Do this
  }
  else if (Plain text)
  {
  Do this
  }
  </code></pre>