Configuration.EvaluationContext Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the ContextInformation object for the Configuration object.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

public ContextInformation EvaluationContext { get; }

Property Value

Type: System.Configuration.ContextInformation

The ContextInformation object for the Configuration object.

A ContextInformation object provides the context necessary for a Configuration object to respond based upon where it is being evaluated.

The following code example demonstrates how to use the EvaluationContext property.

ContextInformation evalContext =
    config.EvaluationContext as ContextInformation;
Console.WriteLine("Machine level: {0}",

.NET Framework
Available since 2.0
Return to top