共用方式為


SqlUserDefinedTypeAttribute(Format) 建構函式

定義

使用者定義型別 (UDT) 上的必要屬性,用於確認指定的型別是 UDT,並指出 UDT 的儲存格式。

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

參數

format
Format

其中一個 Format 值,表示型別的序列化 (Serialization) 格式。

範例

// using Microsoft.SqlServer.Server;

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

備註

下列範例會 Format 指定使用者定義型別的 為 SerializedDataWithMetadata ,且 MaxByteSize 為 8000 個位元組。

適用於