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.
Code Username id1 id2 id3… date
if ([msg_arr.Length - 1] == 6)//YYMMDD
{
strDate = msg_arr[msg_arr.Length - 1].ToString();
}
But i’m getting error here.
Only assignment,call,increment,decrement and new object expression can be use as statement
Should be
if (msg_arr[msg_arr.Length - 1].Length == 6).