Share via


PropertyInformation.IsKey 属性

定义

获取指定配置特性是否为键的值。

public:
 property bool IsKey { bool get(); };
public bool IsKey { get; }
member this.IsKey : bool
Public ReadOnly Property IsKey As Boolean

属性值

如果配置特性为键,则为 true;否则为 false

示例

下面的代码示例演示如何使用 IsKey 属性。 此代码示例是为 PropertyInformation 类提供的一个更大示例的一部分。

// Display the IsKey property.
Console.WriteLine("IsKey: {0}", propertyItem.IsKey);
' Display the IsKey property.
Console.WriteLine("IsKey: {0}", propertyItem.IsKey)

适用于