System.Reflection.FieldInfo.IsStatic Property

Gets a value indicating whether the field is static.

Syntax

public bool IsStatic { get; }

Value

Documentation for this section has not yet been entered.

Remarks

When a field is static, one copy of the field is shared by all instances of the type.

The IsStatic property is set when the FieldAttributes.Static attribute is set.

To get the IsStatic property, first get the class Type. From the Type, get the FieldInfo. From the FieldInfo, get the IsStatic property. To access a non-public field, set the BindingFlags to NonPublic in the GetField method and set the accessibility to Instance or Static.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0