Software Code
    New Code     Most Interesting     Don't Miss     Our picks  
C# - section

View Article
Using System.Array
A short description of how to use System.Array
Ever wondered how to use the Array class from .Net? Here is a use case:

object[] myArray = new object[10];
myArray[0] = "string 1";
myArray[1] = "string 2";
//....other initializations
//....if not initialized with something then the other locations are set to null
Array.Sort(myArray); //sorts the array
Array.Reverse(myArray); //reverses the array so that string 2 is first and string 1 second
Array.Clear(myArray, 0, 1); //eliminates string 2 - puts null in its place
Date: 2008-5-21    Written by: Admin A
     See all articles in this section
Copyright © 2007-2009 SoftwareRiviera.com. All rights reserved.  | Terms of use | Disclaimer | Privacy Policy |