NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TypeConverter.CreateInstance (ITypeDescriptorContext, IDictionary)

Creates an instance of this type given a set of property values for the object. This is useful for objects that are immutable, but still want to provide changable properties.

[Visual Basic]
Overloads Overridable Public Function CreateInstance( _
   ByVal context As ITypeDescriptorContext, _
   ByVal propertyValues As IDictionary _
) As Object
[C#]
public virtual object CreateInstance(
   ITypeDescriptorContext context,
   IDictionary propertyValues
);
[C++]
public: virtual Object* CreateInstance(
   ITypeDescriptorContext* context,
   IDictionary* propertyValues
);
[JScript]
public function CreateInstance(
   context : ITypeDescriptorContext,
   propertyValues : IDictionary
) : Object;

Parameters

context
An ITypeDescriptorContext that represents a context for the formatter.
propertyValues
An IDictionary of new property values. The dictionary contains a series of name-value pairs, one for each property returned from GetProperties.

Return Value

The newly created object, or null if the object could not be created. The default implementation returns null.

Remarks

The context can be used to extract additional information about the environment this converter is being invoked from. This may be a null reference (in Visual Basic Nothing), so you should always check. Also, properties on the context object may also return a null reference (Nothing).

See Also

TypeConverter Class | TypeConverter Members | System.ComponentModel Namespace | TypeConverter.CreateInstance Overload List | ITypeDescriptorContext | IDictionary