Creates an object that can substitute for another data type.
Public Overridable Function CreateInstance ( _ provider As IServiceProvider, _ objectType As Type, _ argTypes As Type(), _ args As Object() _ ) As Object
Dim instance As TypeDescriptionProvider Dim provider As IServiceProvider Dim objectType As Type Dim argTypes As Type() Dim args As Object() Dim returnValue As Object returnValue = instance.CreateInstance(provider, _ objectType, argTypes, args)
public virtual Object CreateInstance( IServiceProvider provider, Type objectType, Type[] argTypes, Object[] args )
public: virtual Object^ CreateInstance( IServiceProvider^ provider, Type^ objectType, array<Type^>^ argTypes, array<Object^>^ args )
public function CreateInstance( provider : IServiceProvider, objectType : Type, argTypes : Type[], args : Object[] ) : Object
The IServiceProvider specified by the provider parameter is passed in by the TypeDescriptor..::.CreateInstance method of the TypeDescriptor class. If provider is not nullNothingnullptra null reference (Nothing in Visual Basic), the service provider can be used by the type description provider to obtain additional context about the creation call.
The CreateInstance method is virtual and, by default, returns the result of the Activator..::.CreateInstance method if provider is nullNothingnullptra null reference (Nothing in Visual Basic). If provider is nullNothingnullptra null reference (Nothing in Visual Basic), this method will invoke the CreateInstance method of the parent provider.
If the derived class is not interested in providing a substitute instance, it should just call the base implementation.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98