Export (0) Print
Expand All

Array.Initialize Method

Initializes every element of the value-type Array by calling the default constructor of the value type.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

[SecuritySafeCriticalAttribute]
public void Initialize()

This method is designed to help compilers support value-type arrays; most users do not need this method. It must not be used on reference-type arrays.

If the Array is not a value-type Array or if the value type does not have a default constructor, the Array is not modified.

The value-type Array can have any lower bound and any number of dimensions.

This method is an O(n) operation, where n is Length.

Caution noteCaution:

You can use this method only on value types that have constructors; however, value types that are native to C# do not have constructors.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft