FieldInfo.IsLiteral Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets a value that indicates whether the value is written at compile time and cannot be changed.
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System.Booleantrue if the field has the Literal attribute set; otherwise, false.
| Exception | Condition |
|---|---|
| MethodAccessException | 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.
Show: