What is a read only collection in C#?
- by acidzombie24
I ran a security code analyst i found myself having a CA2105 warning. I looked at the grade tampering example. I didnt realize you can assign int[] to a readonly int. I thought readonly was like the C++ const and makes it illegal.
The How to Fix Violations suggest i clone the object (which i dont want to do) or 'Replace the array with a strongly…