I am reading some list of values in the result but I am not sure where I am going wrong, I wont know the array size so I cant assign any value to it
string[] result = null;
while (reader.Read())
{
result = Convert.ToString[](reader["RoleID"]);
}
reader.Close();
I am getting: Syntax error; value expected.
After I get the result value, how can I compare the values inside the result with a string? For example, I want to check whether the string check="Can send message"; is present in the result array or not. How can I do that?