c# - How to assign values to an array -
i trying assign invalid characters array , call function checks if entered string text box has invalid characters array in it.
string[] invalidchars = new string[3] ("!", "@","#",)
i keep getting error under string says string class type , cannot used expression
your syntax needs few fixes. here's correct version.
string[] invalidchars = new string[] { "!", "@", "#" };
primarily, need use { } instead of ( ).
Comments
Post a Comment