Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
DateTimeFormatInfo.GetFormat(Type) Method
Definition
- Namespace:
- System.Globalization
- Assemblies:
- mscorlib.dll, System.Globalization.dll
- Assemblies:
- netstandard.dll, System.Runtime.dll
- Assembly:
- System.Globalization.dll
- Assembly:
- System.Runtime.dll
- Assembly:
- mscorlib.dll
- Assembly:
- netstandard.dll
- Source:
- DateTimeFormatInfo.cs
- Source:
- DateTimeFormatInfo.cs
- Source:
- DateTimeFormatInfo.cs
- Source:
- DateTimeFormatInfo.cs
- Source:
- DateTimeFormatInfo.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an object of the specified type that provides a date and time formatting service.
public:
virtual System::Object ^ GetFormat(Type ^ formatType);
public object GetFormat(Type formatType);
public object? GetFormat(Type? formatType);
abstract member GetFormat : Type -> obj
override this.GetFormat : Type -> obj
Public Function GetFormat (formatType As Type) As Object
Parameters
- formatType
- Type
The type of the required formatting service.
Returns
The current object, if formatType is the same as the type of the current DateTimeFormatInfo; otherwise, null.
Implements
Remarks
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.
Applies to
See also
Feedback
Was this page helpful?
