Multiple choice .net

What is the syntax for creating and using an application variable?

  1. Application.VariableName = Value

  2. Application.VariableName = (Value)

  3. Application(VariableName) = Value

  4. Application(VariableName) = (Value)

  5. Application("VariableName") = Value

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

Application variables in ASP.NET are accessed using the Application collection with string keys in parentheses. The syntax Application("VariableName") = Value is correct. The variable name must be a string, not an identifier.