Microsoft Silverlight will reach end of support after October 2021. Learn more.
Gets an object that defines how to format the specified type.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Overridable Function GetFormat ( _ formatType As Type _ ) As Object
public virtual Object GetFormat( Type formatType )
The value of the NumberFormat property, if formatType is a Type object that represents the NumberFormatInfo class. This value is a NumberFormatInfo object that contains numeric formatting information for this CultureInfo object,
The value of the DateTimeFormat property, if formatType is a Type object that represents the DateTimeFormatInfo class. This value is a DateTimeFormatInfo object that contains date and time formatting information for this CultureInfo object,
nulla null reference (Nothing in Visual Basic) , if formatType is any other object.
GetFormat implements IFormatProvider.GetFormat. Typically, this method is not called directly from user code. Instead, it is called by parsing and formatting methods such as Int32.Parse(String, IFormatProvider) or DateTime.ToString(String, IFormatProvider).
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
Supported in: Xbox 360, Windows Phone OS 7.0
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.