AppDomain.IsCompatibilitySwitchSet Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets a nullable Boolean value that indicates whether any compatibility switches are set, and if so, whether the specified compatibility switch is set.

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

Syntax

'Declaration
Public Function IsCompatibilitySwitchSet ( _
    value As String _
) As Nullable(Of Boolean)
public Nullable<bool> IsCompatibilitySwitchSet(
    string value
)

Parameters

Return Value

Type: System.Nullable<Boolean>
nulla null reference (Nothing in Visual Basic) if no compatibility switches are set; otherwise, a Boolean value that indicates whether the compatibility switch that is specified by value is set.

Remarks

This method tests whether the current application domain reverses breaking changes that were introduced in Silverlight 4. The following table provides examples of compatibility switches that can be set to restore the behavior of earlier versions.

Switch

Meaning

"APP_EARLIER_THAN_SL4.0"

Restores the behavior of selected Char and String methods that use ordinal string comparison and case conversion with the invariant culture in Silverlight 2 and Silverlight 3.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference