System::ICustomFormatter::Format 方法

ICustomFormatter::Format method

返回使用指定格式的当前对象表示的值的字符串表示。

virtual System::String System::ICustomFormatter::Format(System::String format, System::SharedPtr<System::Object> arg, System::SharedPtr<System::IFormatProvider> formatProvider)=0
参数类型描述
格式System::String字符串格式
argSystem::SharedPtr<System::Object>待格式化的对象
formatProviderSystem::SharedPtr<System::IFormatProvider>提供格式化信息的对象

ReturnValue

根据 formatformatProvider 指定的格式对 arg 进行格式化后的字符串表示形式

另见