次の方法で共有


FieldInfo.Attributes プロパティ

このフィールドに関連付けられている属性を取得します。

Public MustOverride ReadOnly Property Attributes As FieldAttributes
[C#]
public abstract FieldAttributes Attributes {get;}
[C++]
public: __property virtual FieldAttributes get_Attributes() = 0;
[JScript]
public abstract function get Attributes() : FieldAttributes;

プロパティ値

このフィールドの FieldAttributes

解説

すべてのメンバには、メンバの特定の型に応じて定義されている一連の属性があります。 FieldAttributes は、このフィールドがプライベート フィールドまたは静的フィールドのいずれであるかなどを通知します。

Attributes プロパティを取得するには、最初に Type クラスを取得します。そして、その Type から FieldInfo を取得します。最後に、 FieldInfo から Attributes を取得します。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET, Common Language Infrastructure (CLI) Standard

参照

FieldInfo クラス | FieldInfo メンバ | System.Reflection 名前空間 | FieldAttributes | Type