C# 클래스 NBaseFormatter, shared-source-cli-2.0

This class provides a new formatting code: Bn where n is any number between 2 and 64. This Formatting code allows numbers to be printed out in any base. To get access to the formatting code, a user needs to pass NBaseFormatter provider to string.Format()
상속: IFormatProvider, ICustomFormatter
파일 보기 프로젝트 열기: gbarnett/shared-source-cli-2.0 1 사용 예제들

공개 메소드들

메소드 설명
Format ( string format, object arg, IFormatProvider provider ) : string

Once string.Format gets the ICustomFormatter, it calls this format method on each argument. This implements the ICustomFormatter interface.

GetFormat ( Type formatType ) : object

String.Format calls this method to get an instance of a ICustomFormatter to handle the formatting. In this case the same instance (this) is returned, but it would be possible return an instance of a different type. This method implements IFormatProvider

메소드 상세

Format() 공개 메소드

Once string.Format gets the ICustomFormatter, it calls this format method on each argument. This implements the ICustomFormatter interface.
public Format ( string format, object arg, IFormatProvider provider ) : string
format string
arg object
provider IFormatProvider
리턴 string

GetFormat() 공개 메소드

String.Format calls this method to get an instance of a ICustomFormatter to handle the formatting. In this case the same instance (this) is returned, but it would be possible return an instance of a different type. This method implements IFormatProvider
public GetFormat ( Type formatType ) : object
formatType Type
리턴 object