Gets the preset value of an expression.
Assembly: System.Design (in System.Design.dll)
Contains the preset value of an expression, should one exist. For example, if the expression is a property reference expression referring to the Controls property of a Button, the property contains the instance of the Controls property. This is because the property is read-only and preset by the object to contain a value. On the other hand, a property such as Text or Visible does not have a preset value and therefore the property returns null.
The following C# code shows how serializers can use this information to guide serialization.
Padding p = new Padding(); p.Left = 5; button1.Padding = p; button1.Padding.Left = 5;
The serializer of the Padding structure needs to be informed if it should generate the first or second form. The first form is generated by default. The second form is only generated if there is an ExpressionContext on the context stack that contains a equal to the value of the Padding currently being serialized.
Available since 2.0