Share via


SqlUserDefinedTypeAttribute(Format) Constructor

Definition

A required attribute on a user-defined type (UDT), used to confirm that the given type is a UDT and to indicate the storage format of the UDT.

public:
 SqlUserDefinedTypeAttribute(Microsoft::SqlServer::Server::Format format);
public SqlUserDefinedTypeAttribute (Microsoft.SqlServer.Server.Format format);
new Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute : Microsoft.SqlServer.Server.Format -> Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute
Public Sub New (format As Format)

Parameters

format
Format

One of the Format values representing the serialization format of the type.

Examples

// using Microsoft.SqlServer.Server;

[SqlUserDefinedType(Format.Native, MaxByteSize = 8000)]
public class SampleType
{
    //...
}

Remarks

The following example specifies that the Format of the user-defined type is SerializedDataWithMetadata and the MaxByteSize is 8000 bytes.

Applies to