I have this jagged array in C#:
private static readonly float[][] Numbers = {
new float[]{ 0.3f, 0.4f, 0.5}};
How can I override the value?
public static void SetNewNumbers(float[][] num){
Numbers = num;}
This is not working because of readonly,what should be added? ( I cant change anything about Numbers)
readonly, so you can't assign new value to it.numhas the same number of outermost elements asNumbers, you're OK (i.e. 1 element, in your example). Otherwise, you're out of luck: that's the point ofreadonly