指定した値を、インバリアント カルチャを使用した文字列形式に変換します。
Overloads Public Function ConvertToInvariantString( _
ByVal value As Object _) As String
[C#]
public string ConvertToInvariantString(objectvalue);
[C++]
public: String* ConvertToInvariantString(Object* value);
[JScript]
public function ConvertToInvariantString(
value : Object) : String;
パラメータ
- value
変換対象の Object 。
戻り値
変換後の値を表す String 。
例外
例外の種類 | 条件 |
---|---|
NotSupportedException | 変換できませんでした。 |
解説
context パラメータを使用して、コンバータを呼び出している環境についての追加情報を抽出できます。これは null 参照 (Visual Basic では Nothing) の場合があるため、常に確認してください。また、コンテキスト オブジェクトのプロパティも null 参照 (Nothing) を返す場合があります。
値のフォーマッタの実装によっては、返された文字列を再び同じツールに渡して、オブジェクトのインスタンスを再作成できます。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
TypeConverter クラス | TypeConverter メンバ | System.ComponentModel 名前空間 | TypeConverter.ConvertToInvariantString オーバーロードの一覧 | ITypeDescriptorContext