954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Matrix Dimensions

Hello everybody! Im a new to this site. I wonder how can I get the row dimension of a matrix. For example i have a matrix double[n,m] and i want to get n provided m is unknown. So what property of method should i use???

Thank you

ninikobb
Newbie Poster
1 post since Jan 2011
Reputation Points: 10
Solved Threads: 0
 

Hi ninikobb, welcome here!
Use the GetUpperBound method. Read this: http://msdn.microsoft.com/en-us/library/system.array.getupperbound.aspx

ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
 

I've always used GetLength()

Momerath
Nearly a Senior Poster
3,386 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558
 

What's in a name?
But it seems to me that bounds has more of a matrix thing than length.
Anyways glad to know this method exists :)

ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: