title: Only assignment call increment decrement and new object expression can be use as statement error
body: <p>I wanted to check my last element's array lenght is 6 or not.In here i don't know how many id's comes with this array. My message array comes like this.</p>
  
  <blockquote>
    <p>Code Username id1 id2 id3... date</p>
  </blockquote>
  
  <pre><code>    if ([msg_arr.Length - 1] == 6)//YYMMDD  
      {
          strDate = msg_arr[msg_arr.Length - 1].ToString();
      }
  </code></pre>
  
  <p>But i'm getting error here.</p>
  
  <blockquote>
    <p>Only assignment,call,increment,decrement and new object expression can be use as statement </p>
  </blockquote>