Tag Archives: Array in C#

In this section you can find various articles and code snippets related to Array in C# language. An array type is a reference type that refers to a space containing one or more elements of a certain type. All array types derive from a common base class, System.Array.

An array is a sequential list of items. The kind of items you can store in the array are defined by the type of the array at declaration. Arrays can be single or multi-dimensional, and each dimension can have varying lengths (jagged).

Simple Example of Array in C#

int[] myIntArray = new int[5] { 1, 2, 3, 4, 5 };

External Links:
Array class on MSDN

Search for an element in array with Array.Find method in c#

 
Array.Find method searches for an element that matches the conditions defined by the specified predicate(The Predicate is a delegate to a method that returns true if the object passed to it matches the conditions defined in the delegate.), and returns the first occurrence within the entire specified Array.
Continue reading Search for an element in array with Array.Find method in c#