F
Francois
Hi,
In c#, is it possible to have an array of string declared as being constant:
something like:
protected const string[] OptionsGameFilterValues = new String[] {"Tom",
"Jon", "Henry"};
but this code does not compile.
However the MSDN documentation says that const modifier keyword can apply to
any reference type. An array is a reference type. And it is an array of
string then the values can be defined at compile time... Then what is wrong?
How to declare a constant array of string?
Thanks in advance.
Best regards,
Francois
In c#, is it possible to have an array of string declared as being constant:
something like:
protected const string[] OptionsGameFilterValues = new String[] {"Tom",
"Jon", "Henry"};
but this code does not compile.
However the MSDN documentation says that const modifier keyword can apply to
any reference type. An array is a reference type. And it is an array of
string then the values can be defined at compile time... Then what is wrong?
How to declare a constant array of string?
Thanks in advance.
Best regards,
Francois