Editare

Partajați prin


LowerCaseStringConverter.ConvertFrom Method

Definition

Converts an object from its original value to a lowercase string based on the specified parameters.

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

Parameters

ctx
ITypeDescriptorContext

An object that implements the ITypeDescriptorContext interface.

ci
CultureInfo

An object that implements the CultureInfo class.

data
Object

The object to convert.

Returns

A lowercase string object.

Examples

The following example demonstrates how to use this method.

// ConvertFrom method.
Console.WriteLine("Original Value: {0}",
  testStrVal.ToString());
resultStrVal = myLCStrConverter.ConvertFrom(ctx, ci, testStrVal);
Console.WriteLine("ConvertFrom result: {0}", 
  resultStrVal.ToString());
' ConvertFrom method.
Console.WriteLine("Original Value: {0}", _
  testStrVal.ToString())
resultStrVal = myLCStrConverter.ConvertFrom(ctx, ci, testStrVal)
Console.WriteLine("ConvertFrom result: {0}", _
  resultStrVal.ToString())

Remarks

This method uses an object that implements the ITypeDescriptorContext interface as the ctx parameter. This interface provides contextual information about a component. Typically, this interface is used at design time to provide information about a design-time container. The ITypeDescriptorContext is commonly used in type conversion. The ci parameter object provides the culture-related information. The data parameter object acts as both the object to convert and the resulting object once the method is complete. Override this method in a derived class if custom behavior is required.

Applies to

See also