Share via


FileCodeGroup.AttributeString 属性

定义

获取代码组策略声明的特性的字符串表示形式。

public:
 virtual property System::String ^ AttributeString { System::String ^ get(); };
public override string AttributeString { get; }
member this.AttributeString : string
Public Overrides ReadOnly Property AttributeString As String

属性值

总是为 null

示例

以下代码演示如何使用 AttributeString 属性获取代码组的属性。 此代码示例是为 FileCodeGroup 类提供的一个更大示例的一部分。

if ( fileCodeGroup->AttributeString != nullptr )
{
   throw gcnew NullReferenceException(
      L"The AttributeString property should be null." );
}
if (fileCodeGroup.AttributeString != null)
{
    throw new NullReferenceException(
        "The AttributeString property should be null.");
}
If (Not fileCodeGroup.AttributeString Is Nothing) Then
    Throw New NullReferenceException( _
        "AttributeString property is not empty")
End If

注解

FileCodeGroup 不使用 AttributeString,因此此属性始终 null为 。

适用于