How to solve ‘…is a ‘type’, which is not valid in the given context’? (C#)

This exception can also be raised when dealing with arrays and forgetting keyword new. (Happened in my case)

Array Syntax(C#)

data_type [] arrayName =  new data_type[size];

Leave a Comment