Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

How do I enumerate all indices to a multi-dimensional array?

$
0
0

I would like to fill a multi-dimensional array A with values of function f.  I am tempted to write

foreach (int[] X in A. GetIndices ()) A .SetValue (X, f (X));
But I cannot find anything resembling Array .GetIndices.  Please help.


Christopher Yeleighton


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>