Udostępnij za pośrednictwem


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
)
public FieldSchema (
    String name, 
    Type dataType
)
public function FieldSchema (
    name : String, 
    dataType : Type
)

Parameters

  • name
  • dataType
    The data type of the field. Must be a valid value type.

Exceptions

Exception type 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.

See Also

Reference

FieldSchema Class
FieldSchema Members
Microsoft.Synchronization.MetadataStorage Namespace