MarshalAsAttribute.SizeConst MarshalAsAttribute.SizeConst MarshalAsAttribute.SizeConst 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.

public: int SizeConst;
public int SizeConst;
val mutable SizeConst : int
Public SizeConst As Integer 

字段值

注解

此字段是必要条件ByValArrayByValTStr的成员System.Runtime.InteropServices.UnmanagedType枚举。This field is required for the ByValArray and ByValTStr members of the System.Runtime.InteropServices.UnmanagedType enumeration. 因为元数据的压缩的格式被限制为 0x1FFFFFFF,允许的值的范围SizeConst是 (> = 0 和 < = 0x1FFFFFFF)。Because the compressed format of the metadata is limited to 0x1FFFFFFF, the range of allowed values for SizeConst are (>= 0 and <= 0x1FFFFFFF).

有关其他信息,请参阅默认封送处理数组For additional information, see Default Marshaling for Arrays.

适用于

另请参阅