.NET Framework Bookmark and Share   
 index > .NET Base Class Library > Length of 2D array
 

Length of 2D array

I have a 2D array

private string[,]Test = new string[6,4];

if I want to know how many rows are there (e.g. 6)

how can I get it?

because when I use "Test.Length"

it return 24

Thank you

OscarKwok
Use the GetLength or GetLongLength methods.
Appel
Use the GetLength or GetLongLength methods.
Appel
Use Test.Length(0).
nobugz

You can use google to search for other answers

Custom Search

More Threads

• COM Interop Strange Behavior In IDE
• configuration file not found
• Windows Update - .NET 1.1 and 2.0 redists
• How to use a cryptoidentity with .NET
• How to understand daylight saving time?
• VB.NET
• Executing VB code at runtime
• How to Get Process Id of a running application?
• Help with DataSet in C# - simple relations between tables
• A weird problem with string variables