CultureInfo.GetFormat(Type) 메서드

정의

지정된 형식의 서식을 지정하는 방법을 정의하는 개체를 가져옵니다.

public:
 virtual System::Object ^ GetFormat(Type ^ formatType);
public virtual object GetFormat (Type formatType);
public virtual object? GetFormat (Type? formatType);
abstract member GetFormat : Type -> obj
override this.GetFormat : Type -> obj
Public Overridable Function GetFormat (formatType As Type) As Object

매개 변수

formatType
Type

형식 지정 개체를 가져오는 Type입니다. 이 메서드는 NumberFormatInfoDateTimeFormatInfo 형식만 지원합니다.

반환

Object

NumberFormat 속성의 값입니다. 이것은 formatTypeNumberFormatInfo 클래스의 CultureInfo 개체인 경우 현재 Type에 대한 기본 숫자 형식 정보를 포함하는 NumberFormatInfo입니다.

또는

formatTypeDateTimeFormat 클래스에 대한 DateTimeFormatInfo 개체인 경우 현재 CultureInfo에 대한 기본 날짜 및 시간 형식 정보를 포함하는 Type 속성의 값(DateTimeFormatInfo)입니다.

또는

formatType이 다른 개체이면 null입니다.

구현

설명

GetFormatIFormatProvider.GetFormat를 구현합니다.

NumberFormatInfo 는 기본 데이터 형식의 Format 메서드와 함께 사용되는 문화권별 숫자 형식을 제공합니다. DateTimeFormatInfo 는 특정 문화권에 대한 날짜 및 시간 값의 서식을 지정하는 방법을 제어합니다.

적용 대상

추가 정보