FieldSchema 构造函数 (String, Type, UInt32)

初始化 FieldSchema 类的一个新实例,该实例基于指定的字段名称、字段数据类型和字段最大长度。

命名空间: Microsoft.Synchronization.MetadataStorage
程序集: Microsoft.Synchronization.MetadataStorage(在 microsoft.synchronization.metadatastorage.dll 中)

语法

声明
Public Sub New ( _
    name As String, _
    dataType As Type, _
    maxLength As UInteger _
)
用法
Dim name As String
Dim dataType As Type
Dim maxLength As UInteger

Dim instance As New FieldSchema(name, dataType, maxLength)
public FieldSchema (
    string name,
    Type dataType,
    uint maxLength
)
public:
FieldSchema (
    String^ name, 
    Type^ dataType, 
    unsigned int maxLength
)
public FieldSchema (
    String name, 
    Type dataType, 
    UInt32 maxLength
)
public function FieldSchema (
    name : String, 
    dataType : Type, 
    maxLength : uint
)

参数

  • name
  • dataType
    字段的数据类型。
  • maxLength
    字段的最大长度。当字段为字节数组时以字节为单位,而当字段为字符串时以字符为单位。对于其他类型的字段,则忽略该值。

异常

异常类型 条件

ArgumentNullException

name 为 null 引用(在 Visual Basic 中为 Nothing),或 dataType 为 null 引用(在 Visual Basic 中为 Nothing)。

ArgumentException

name 的长度为 0。

ArgumentOutOfRangeException

maxLength 为 0。

请参阅

参考

FieldSchema 类
FieldSchema 成员
Microsoft.Synchronization.MetadataStorage 命名空间