title: Arrays position inside foreach
body: <p>In here i wanted to check elements 0th position is settelg or not... is this correct?  messageIn comes from SMS gateway.In that message i wanted to check Array 0th position is setelg or not   </p>
  
  <pre><code>public void ValidateReceivedMessage(string messageIn)
   {
      int MaleMooseID=1;
     //ArrayList msg_arr = new ArrayList();
     //string[] msg_arr = {messageIn};
     if (messageIn != null)
      {
         string[] msg_arr = messageIn.Split(' ');
         int size = msg_arr.Length;
         foreach (string _element in msg_arr)
         {
             if (_element == "settelg")
             {
  
              Response.Redirect("../DesktopModules/SMSFunction/SeenSMS.ascx?    value=1&amp;arr=" + string.Join("|", msg_arr, 0, msg_arr.Length));
  
             }
             else if(_element =="skuttelg")
             {
  
             }
         }
     }
  </code></pre>