ProxyAttribute.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 either an uninitialized MarshalByRefObject or a transparent proxy, depending on whether the specified type can exist in the current context.
public:
virtual MarshalByRefObject ^ CreateInstance(Type ^ serverType);
public virtual MarshalByRefObject CreateInstance (Type serverType);
[System.Security.SecurityCritical]
public virtual MarshalByRefObject CreateInstance (Type serverType);
abstract member CreateInstance : Type -> MarshalByRefObject
override this.CreateInstance : Type -> MarshalByRefObject
[<System.Security.SecurityCritical>]
abstract member CreateInstance : Type -> MarshalByRefObject
override this.CreateInstance : Type -> MarshalByRefObject
Public Overridable Function CreateInstance (serverType As Type) As MarshalByRefObject
Parameters
- serverType
- Type
The object type to create an instance of.
Returns
An uninitialized MarshalByRefObject or a transparent proxy.
- Attributes
Examples
// Create an instance of ServicedComponentProxy
virtual MarshalByRefObject^ CreateInstance( Type^ serverType ) override
{
return ProxyAttribute::CreateInstance( serverType );
}
// Create an instance of ServicedComponentProxy
public override MarshalByRefObject CreateInstance(Type serverType)
{
return base.CreateInstance(serverType);
}
' Create an instance of ServicedComponentProxy
Public Overrides Function CreateInstance(serverType As Type) As MarshalByRefObject
Return MyBase.CreateInstance(serverType)
End Function 'CreateInstance
Applies to
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.