HttpStaticObjectsCollection.Item Property
Gets the object with the specified name from the collection.
[C#] In C#, this property is the indexer for the HttpStaticObjectsCollection class.
[Visual Basic] Public Default ReadOnly Property Item( _ ByVal name As String _ ) As Object [C#] public object this[ string name ] {get;} [C++] public: __property Object* get_Item( String* name ); [JScript] returnValue = HttpStaticObjectsCollectionObject.Item(name); -or- returnValue = HttpStaticObjectsCollectionObject(name);
[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.
Arguments [JScript]
- name
- The case-insensitive name of the object to get.
Parameters [Visual Basic, C#, C++]
- name
- The case-insensitive name of the object to get.
Property Value
An object from the collection.
Example
The following example retrieves an object named ArrayList1 from the StaticObjects collection and copies it to an object variable.
[Visual Basic] Dim MyObject As Object MyObject = Application.StaticObjects("ArrayList1") [C#] Object MyObject; MyObject = Application.StaticObjects["ArrayList1"]; [C++] Object* MyObject; MyObject = Application->StaticObjects->Item[S"ArrayList1"]; [JScript] var myObject : Object myObject = Application.StaticObjects("ArrayList1")
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
HttpStaticObjectsCollection Class | HttpStaticObjectsCollection Members | System.Web Namespace