CultureInfoConverter.ConvertFrom メソッド

定義

指定した値オブジェクトを CultureInfoに変換します。

public:
 override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value);
public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (context As ITypeDescriptorContext, culture As CultureInfo, value As Object) As Object

パラメーター

context
ITypeDescriptorContext

形式コンテキストを提供する ITypeDescriptorContext

culture
CultureInfo

変換先のカルチャを指定する CultureInfo

value
Object

変換する Object

返品

変換後の値を表す Object

例外

value は無効なカルチャを指定します。

変換を実行できません。

注釈

このコンバーターは、 CultureInfo オブジェクトを文字列との間でのみ変換できます。

context パラメーターを使用すると、コンバーターが呼び出される環境に関する追加情報を抽出できます。 これは nullできるため、常に確認してください。 また、コンテキスト オブジェクトのプロパティは、 nullを返すことができます。

適用対象

こちらもご覧ください