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)

public:
FieldSchema(
	String^ name, 
	Type^ dataType
)

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.

ExceptionCondition
ArgumentNullException

name is a nullptr, or dataType is a nullptr.

ArgumentException

name is 0 length.

MetadataStoreInvalidOperationException

dataType is not a value type or is of type System::Guid.

This form of the constructor sets MaxLength to the size of dataType, in bytes.

Show: