Click here to Skip to main content
15,907,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have defined one multi dimension array
C#
double[, ,] Joint = new double[100, 20, 3];

but some time array is not get filled completely that is get field with values less than its maximum size.

How can I get filled length of this array?

Thanks
Posted
Updated 23-Oct-13 1:37am
v2

1 solution

Use the GetUpperBound()[^] method for that for every dimension separately, or Array.Length[^] for the sum of all elements.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900