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
ParameterType描述
格式System::String字符串格式
argSystem::SharedPtr<System::Object>要格式化的对象
formatProviderSystem::SharedPtr<System::IFormatProvider>提供格式信息的对象

ReturnValue

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

另见