DateTimeFormatInfo::GetFormat Method (Type^)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns an object of the specified type that provides a date and time formatting service.

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

public:
virtual Object^ GetFormat(
	Type^ formatType
) sealed

Parameters

formatType
Type: System::Type^

The type of the required formatting service.

Return Value

Type: System::Object^

The current object, if formatType is the same as the type of the current DateTimeFormatInfo; otherwise, null.

The Format(String, IFormatProvider) method supported by the base data types invoke this method when the current DateTimeFormatInfo object is passed as the IFormatProvider parameter. This method implements IFormatProvider::GetFormat.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: