System.Globalization.DateTimeFormatInfo.GetFormat C# (CSharp) Méthode

GetFormat() public méthode

Returns an object of the specified type that provides a date and time formatting service.
public GetFormat ( Type formatType ) : object
formatType Type The type of the required formatting service.
Résultat object
        public extern object GetFormat(Type formatType);

Usage Example

        public void PosTest1()
        {
            DateTimeFormatInfo expected = new DateTimeFormatInfo();
            object obj = expected.GetFormat(typeof(DateTimeFormatInfo));

            Assert.True(obj is DateTimeFormatInfo);

            DateTimeFormatInfo actual = obj as DateTimeFormatInfo;
            Assert.Equal(expected, actual);
        }
All Usage Examples Of System.Globalization.DateTimeFormatInfo::GetFormat