CultureInfoExtensionsWithBinaryUnitInfo Method

Extends an existing CultureInfo object with a BinaryUnitInfo object.

Definition

Namespace: Ookii
Assembly: Ookii.BinarySize (in Ookii.BinarySize.dll) Version: 1.2.0+20f0bdf981c7baf115c68ccab612b1a031efcb4d
C#
public static CultureInfo WithBinaryUnitInfo(
	this CultureInfo culture,
	BinaryUnitInfo binaryUnitInfo
)

Parameters

culture  CultureInfo
The CultureInfo to extend.
binaryUnitInfo  BinaryUnitInfo
The BinaryUnitInfo to add to culture.

Return Value

CultureInfo
An object that wraps culture, returning all the same information, but whose IFormatProvider implementation can also return the value of binaryUnitInfo.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type CultureInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

Use this method if you wish to use a custom culture, other than the current value of the CurrentCulture property, along with a custom BinaryUnitInfo object.

Exceptions

ArgumentNullExceptionculture or binaryUnitInfo is .

See Also