FieldSchema Constructor (String, Type)
Initializes a new instance of the FieldSchema class that is based on the specified name and data type.
Namespace: Microsoft.Synchronization.MetadataStorage
Assembly: Microsoft.Synchronization.MetadataStorage (in Microsoft.Synchronization.MetadataStorage.dll)
Syntax
'Declaration
Public Sub New ( _
name As String, _
dataType As Type _
)
'Usage
Dim name As String
Dim dataType As Type
Dim instance As New FieldSchema(name, dataType)
public FieldSchema(
string name,
Type dataType
)
public:
FieldSchema(
String^ name,
Type^ dataType
)
new :
name:string *
dataType:Type -> FieldSchema
public function FieldSchema(
name : String,
dataType : Type
)
Parameters
- name
Type: System.String
The name of the custom field.
- dataType
Type: System.Type
The data type of the field. Must be a valid value type.
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. |
MetadataStoreInvalidOperationException | dataType is not a value type or is of type System.Guid. |
Remarks
This form of the constructor sets MaxLength to the size of dataType, in bytes.