SelectionRangeConverter::CreateInstance Method (ITypeDescriptorContext^, IDictionary^)

 

Creates a SelectionRange object by using the specified type descriptor and set of property values for that object.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
virtual Object^ CreateInstance(
	ITypeDescriptorContext^ context,
	IDictionary^ propertyValues
) override

Parameters

context
Type: System.ComponentModel::ITypeDescriptorContext^

A ITypeDescriptorContext that provides a format context.

propertyValues
Type: System.Collections::IDictionary^

An IDictionary that contains the new property values.

Return Value

Type: System::Object^

If successful, the newly created SelectionRange; otherwise, this method throws an exception.

Exception Condition
ArgumentException

propertyValues is null or its Start and End elements could not be converted into a SelectionRange.

Use the CreateInstance method to make changes to an existing immutable object by creating a modified version of it. This method expects the propertyValues parameter to have elements with key values of Start and End, each with the corresponding DateTime value.

.NET Framework
Available since 1.1
Return to top
Show: