SizeConverter.CreateInstance(ITypeDescriptorContext, IDictionary) Methode

Definition

Erstellt ein Objekt dieses Typs mithilfe einer angegebenen Gruppe von Eigenschaftswerten für das Objekt. Dies ist nützlich, um nicht veränderbare Objekte zu erstellen, die über veränderbare Eigenschaften verfügen.

public:
 override System::Object ^ CreateInstance(System::ComponentModel::ITypeDescriptorContext ^ context, System::Collections::IDictionary ^ propertyValues);
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext? context, System.Collections.IDictionary propertyValues);
public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues);
override this.CreateInstance : System.ComponentModel.ITypeDescriptorContext * System.Collections.IDictionary -> obj
Public Overrides Function CreateInstance (context As ITypeDescriptorContext, propertyValues As IDictionary) As Object

Parameter

context
ITypeDescriptorContext

Ein TypeDescriptor zusätzlicher Kontext, über den zusätzliche Kontext bereitgestellt werden kann.

propertyValues
IDictionary

Ein Wörterbuch mit neuen Eigenschaftswerten. Das Wörterbuch enthält eine Reihe von Name-Wert-Paaren, eine für jede Eigenschaft, die von der GetProperties(ITypeDescriptorContext, Object, Attribute[]) Methode zurückgegeben wird.

Gibt zurück

Das neu erstellte Objekt oder null wenn das Objekt nicht erstellt werden konnte. Die Standardimplementierung gibt null zurück.

Gilt für: