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
public virtual object GetFormat(
 Type formatType
public: virtual Object* GetFormat(
 Type* formatType
public function GetFormat(
   formatType : Type
) : Object;


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).




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.


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

© 2014 Microsoft. All rights reserved.