SizeConverter.CreateInstance(ITypeDescriptorContext, IDictionary) Methode

Definition

Erstellt ein Objekt dieses Typs mithilfe eines angegebenen Satzes von Eigenschaftswerten für das Objekt. Dies bietet sich für das Erstellen unveränderlicher Objekte an, die über veränderliche 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, mit dem zusätzlicher Kontext bereitgestellt werden kann.

propertyValues
IDictionary

Ein Wörterbuch mit neuen Eigenschaftswerten. Das Wörterbuch enthält für jede von der GetProperties(ITypeDescriptorContext, Object, Attribute[])-Methode zurückgegebene Eigenschaft ein Name-Wert-Paar.

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: