FieldInfo.IsLiteral Property

Gets a value that indicates whether the value is written at compile time and cannot be changed.

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

public bool IsLiteral { get; }

Property Value

Type: System.Boolean
true if the field has the Literal attribute set; otherwise, false.


This member is invoked late-bound through mechanisms such as Type.InvokeMember.

The IsLiteral property is set when the Literal attribute is set. If this attribute is set, the field cannot be changed and is constant.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2015 Microsoft