DesignSurface.CreateInstance(Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an instance of the given type.
protected public:
virtual System::Object ^ CreateInstance(Type ^ type);
protected internal virtual object CreateInstance (Type type);
protected internal virtual object? CreateInstance (Type type);
abstract member CreateInstance : Type -> obj
override this.CreateInstance : Type -> obj
Protected Friend Overridable Function CreateInstance (type As Type) As Object
Parameters
- type
- Type
The type to create.
Returns
The newly created object.
Exceptions
type
is null
.
The IDesignerHost attached to the DesignSurface has been disposed.
Remarks
If type
is an IComponent, CreateInstance searches for a constructor of type IContainer first, followed by an empty constructor.
Applies to
Spolupráca s nami v službe GitHub
Zdroj tohto obsahu nájdete v službe GitHub, kde môžete vytvárať a skúmať problémy a žiadosti o prijatie zmien. Ďalšie informácie nájdete v našom sprievodcovi prispievateľom.