Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DateTimeFormatInfo.GetFormat Method

Returns an object of the specified type that provides a DateTime formatting service.

[Visual Basic]
Public Overridable Function GetFormat( _
   ByVal formatType As Type _
) As Object Implements IFormatProvider.GetFormat
[C#]
public virtual object GetFormat(
 Type formatType
);
[C++]
public: virtual Object* GetFormat(
 Type* formatType
);
[JScript]
public function GetFormat(
   formatType : Type
) : Object;

Parameters

formatType
The Type of the required formatting service.

Return Value

The current DateTimeFormatInfo, if formatType is the same as the type of the current DateTimeFormatInfo; otherwise, a null reference (Nothing in Visual Basic).

Implements

IFormatProvider.GetFormat

Remarks

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

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

DateTimeFormatInfo Class | DateTimeFormatInfo Members | System.Globalization Namespace | IFormatProvider | GetFormat

Show:
© 2014 Microsoft. All rights reserved.