Sunday, January 25, 2009

C# Array UBound Function

How to get the Upper Bound of an Array in C#

The upper bound of the array can be retrieved using the Length property as shown below:

private void GetUbound()

{

String[] arTemp = {"First","Second"};

MessageBox.Show (arTemp.Length.ToString ());

}

0 comments:

kbAlertz.com :: Visual Studio 2005

kbAlertz.com :: Visual Studio 2008

kbAlertz.com :: Visual Basic 2005