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
Zusammenarbeit auf GitHub
Die Quelle für diesen Inhalt finden Sie auf GitHub, wo Sie auch Issues und Pull Requests erstellen und überprüfen können. Weitere Informationen finden Sie in unserem Leitfaden für Mitwirkende.