FontConverter.CreateInstance(ITypeDescriptorContext, IDictionary) Methode

Definition

Erstellt ein Objekt dieses Typs mithilfe eines angegebenen Satzes von Eigenschaftswerten für das Objekt.

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 Typdeskriptor, 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-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.

CreateInstance(ITypeDescriptorContext, IDictionary) bietet sich für das Erstellen unveränderlicher Objekte an, die über veränderliche Eigenschaften verfügen.

Gilt für: