FieldSchema Constructor (String, Type, UInt32)
Initializes a new instance of the FieldSchema class that is based on the specified name, data type, and the maximum length of the field.
Namespace: Microsoft.Synchronization.MetadataStorage
Assembly: Microsoft.Synchronization.MetadataStorage (in Microsoft.Synchronization.MetadataStorage.dll)
Syntax
'Declaration
Public Sub New ( _
name As String, _
dataType As Type, _
maxLength As UInteger _
)
'Usage
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
)
new :
name:string *
dataType:Type *
maxLength:uint32 -> FieldSchema
public function FieldSchema(
name : String,
dataType : Type,
maxLength : uint
)
Parameters
- name
Type: System.String
The name of the custom field.
- dataType
Type: System.Type
The data type of the field.
- maxLength
Type: System.UInt32
The maximum length of the field, in bytes when the field is an array of bytes or in characters when the field is a string. This value is ignored for other types of fields.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | name is a null reference (Nothing in Visual Basic), or dataType is a null reference (Nothing in Visual Basic). |
ArgumentException | name is 0 length. |
ArgumentOutOfRangeException | maxLength is 0. |