I have a function that checks if a 2-dimensional string array contains a specific string value using .Contains
. System.Linq
is being used, as seems to be the problem in similar questions, however I still get the error of:
'string[,]' does not contain a definition for 'Contains' and the best extension method overload 'Queryable.Contains(IQueryable,string)' requires a receiver of type 'IQueryable'.
This error persists no matter what I change the comparison value to. The context for the error occuremce is as
string comparisonString = " ";
bool victoryRequirement = mineArray.Contains(comparisonString);
I hope someone can tell me why this error occurs and whether or not I am able to use Contains
for this purpose. I suspect the 2-dimensional array is partly at fault, but I am not that experienced.