ProxyAttribute.CreateInstance(Type) Metodo

Definizione

Crea un oggetto MarshalByRefObject non inizializzato oppure un proxy trasparente, a seconda se il tipo specificato può essere presente nel contesto corrente.

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

Parametri

serverType
Type

Tipo dell'oggetto di cui creare un'istanza.

Restituisce

MarshalByRefObject

Oggetto MarshalByRefObject non inizializzato oppure proxy trasparente.

Attributi

Esempio

// 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

Si applica a