This documentation is archived and is not being maintained.

CompareInfo.GetCompareInfo Method (Int32, Assembly)

Initializes a new instance of the CompareInfo class that is associated with the culture having the specified identifier and uses string comparison methods in the specified Assembly.

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

public static CompareInfo GetCompareInfo (
	int culture,
	Assembly assembly
)
public static CompareInfo GetCompareInfo (
	int culture, 
	Assembly assembly
)
public static function GetCompareInfo (
	culture : int, 
	assembly : Assembly
) : CompareInfo

Parameters

culture

An integer representing the culture identifier.

assembly

An Assembly that contains the string comparison methods to use.

Return Value

A new instance of the CompareInfo class that is associated with the specified culture and uses string comparison methods in the specified Assembly.

Exception typeCondition

ArgumentNullException

assembly is a null reference (Nothing in Visual Basic).

ArgumentException

assembly is of an invalid type.

The assembly parameter must be of the same type as Module.Assembly.

If a security decision depends on a string comparison or a case-change operation, use the InvariantCulture to ensure that the behavior will be consistent regardless of the culture settings of the system.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Show: