共用方式為


IndexSchema 建構 (String, Boolean)

初始化 IndexSchema 類別的新執行個體,這個執行個體包含指定的索引欄位名稱以及一個可指出此索引結構描述是否可唯一定義項目的值。

命名空間: Microsoft.Synchronization.MetadataStorage
組件: Microsoft.Synchronization.MetadataStorage (在 microsoft.synchronization.metadatastorage.dll)

語法

'宣告
Public Sub New ( _
    fieldName As String, _
    isUnique As Boolean _
)
'用途
Dim fieldName As String
Dim isUnique As Boolean

Dim instance As New IndexSchema(fieldName, isUnique)
public IndexSchema (
    string fieldName,
    bool isUnique
)
public:
IndexSchema (
    String^ fieldName, 
    bool isUnique
)
public IndexSchema (
    String fieldName, 
    boolean isUnique
)
public function IndexSchema (
    fieldName : String, 
    isUnique : boolean
)

參數

  • fieldName
    索引欄位名稱。
  • isUnique
    如果此索引結構描述可唯一識別項目則為 true,否則為 false

例外

例外狀況型別 條件

ArgumentNullException

fieldName 是 null 參考 (在 Visual Basic 中為 Nothing)。

ArgumentException

fieldName 的長度為 0。

備註

傳入 fieldName 的欄位也必須存在於為此複寫所定義的自訂欄位結構描述中。

請參閱

參考

IndexSchema 類別
IndexSchema 成員
Microsoft.Synchronization.MetadataStorage 命名空間