In This Article

ArrayExtension Class

A markup extension that can create an array of items.

public class ArrayExtension
Inheritance:
object object

Constructors

ArrayExtension()

Initializes an instance of the class.

public ArrayExtension()

ArrayExtension(Array)

Initializes an instance of the class, initializing it with the specified Array.

public ArrayExtension(Array elements)
Parameter Type Description
elements Array

The array of elements.

ArrayExtension(Type)

Initializes an instance of the class, using the specified Type.

[Obsolete("All arrays are now returned as generic 'object?[]' instead of type-specific arrays, so the Type argument is ignored and this constructor will be removed in a future release.")]
public ArrayExtension(Type type)
Parameter Type Description
type Type

The Type of the items within the array.

Properties

Items

The collection of items in the array.

[Content]
public IList Items { get; }

Property Value

IList

Type

The Type of the items within the array, which if not specified, will be derived.

[ConstructorArgument("type")]
[Obsolete("All arrays are now returned as generic 'object?[]' instead of type-specific arrays, so this property is ignored and will be removed in a future release.")]
public Type? Type { get; set; }

Property Value

Type

Methods

ProvideValue()

Returns an array of values.

public object? ProvideValue()

Returns

object:

The object value to set on the property where the extension is applied.

Inherited Members

Extension Methods