I want to create a read only array in my c# code
private readonly string[] students = new string[] { "Alice", "John" };
Compiler does not complain about it but I read on the following link that array fields should not be read only. what is the best way of creating a read only array?
https://learn.microsoft.com/en-us/visualstudio/code-quality/ca2105?view=vs-2019
How can I make a read only array? I just need a static array to check against other values