HttpApplicationState.Get Método

Definición

Obtiene un objeto HttpApplicationState por nombre o índice.

Sobrecargas

Get(Int32)

Obtiene un objeto HttpApplicationState por índice numérico.

Get(String)

Obtiene un objeto HttpApplicationState por el nombre.

Get(Int32)

Obtiene un objeto HttpApplicationState por índice numérico.

public:
 System::Object ^ Get(int index);
public object Get (int index);
member this.Get : int -> obj
Public Function Get (index As Integer) As Object

Parámetros

index
Int32

Índice del objeto de estado de aplicación.

Devoluciones

Objeto al que hace referencia index.

Ejemplos

En el ejemplo siguiente se devuelve el primer objeto (índice = 0) de la HttpApplicationState colección del objeto intrínseco Application y se copia en una nueva variable de objeto.

Object MyObject;
MyObject = Application.Get(0);
Dim MyObject As Object
MyObject = Application.Get(0)

Se aplica a

Get(String)

Obtiene un objeto HttpApplicationState por el nombre.

public:
 System::Object ^ Get(System::String ^ name);
public object Get (string name);
member this.Get : string -> obj
Public Function Get (name As String) As Object

Parámetros

name
String

El nombre del objeto.

Devoluciones

Objeto al que hace referencia name.

Comentarios

En el ejemplo siguiente se devuelve un objeto denominado MyAppVar1 de la HttpApplicationState colección del objeto intrínseco Application y se copia en una nueva variable de objeto.

Dim MyObject As Object  
MyObject = Application.Get("MyAppVar1")  
Object MyObject;  
MyObject = Application.Get("MyAppVar1");  

Se aplica a