System.Runtime.InteropServices.MarshalAsAttribute.SizeConst Field

Indicates the number of elements in the fixed-length array or the number of characters (not bytes) in a string to import.

Syntax

public int SizeConst

Remarks

This field is required for the UnmanagedType.ByValArray and UnmanagedType.ByValTStr members of the System.Runtime.InteropServices.UnmanagedType enumeration. Because the compressed format of the metadata is limited to 0x1FFFFFFF, the range of allowed values for MarshalAsAttribute.SizeConst are (>= 0 and <= 0x1FFFFFFF).

For additional information, see [<topic://cpcondefaultmarshalingforarrays>].

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0