VersioningHelper.MakeVersionSafeName Method (String, ResourceScope, ResourceScope, Type)

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

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Returns a version-safe name based on the specified resource name, the intended resource consumption scope, and the type using the resource.

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

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Shared Function MakeVersionSafeName ( _
    name As String, _
    from As ResourceScope, _
    to As ResourceScope, _
    type As Type _
) As String
[SecuritySafeCriticalAttribute]
public static string MakeVersionSafeName(
    string name,
    ResourceScope from,
    ResourceScope to,
    Type type
)

Parameters

Return Value

Type: System.String
A version-safe name.

Exceptions

Exception Condition
ArgumentException

The values for from and to are invalid. The resource type in the ResourceScope enumeration is going from a more restrictive resource type to a more general resource type.

ArgumentNullException

type is null.

Remarks

The original name is returned with a scope related suffix.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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