11-Jun-03 (Created: 11-Jun-03) | More in 'CS-dotnet'

How do you work with arrays in c#?

Instantiating an array

MyClass[] arrayObject = new MyClass[2];

Checking to see if an object is an array

if (arrayObject is System.Array)
{
   // yes it is an array
}

Splitting a string in to arrays

char[] sepString = new char[]{'1'};
string[] userIdList = customerIdList.Split(sepString);