HttpApplicationState.GetKey(Int32) 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.
Gets an HttpApplicationState object name by index.
public:
System::String ^ GetKey(int index);
public string GetKey (int index);
member this.GetKey : int -> string
Public Function GetKey (index As Integer) As String
Parameters
- index
- Int32
The index of the application state object.
Returns
The name under which the application state object was saved.
Examples
The following example returns the names of all the objects in the application state collection and stores the names in a string array.
int Loop1;
String[] StateVars = new String[Application.Count];
for (Loop1 = 0; Loop1 < Application.Count; Loop1++)
{
StateVars[Loop1] = Application.GetKey(Loop1);
}
Dim Loop1 As Integer
Dim StateVars(Application.Count) As String
For Loop1 = 0 To Application.Count -1
StateVars(Loop1) = Application.GetKey(Loop1)
Next Loop1
Applies to
Samarbeid med oss på GitHub
Du finner kilden for dette innholdet på GitHub. Der du også kan opprette og se gjennom problemer og pull-forespørsler. Hvis du vil ha mer informasjon, kan du se vår bidragsyterveiledning.