This documentation is archived and is not being maintained.

HttpStaticObjectsCollection.GetObject Method

Returns the object with the specified name from the collection. This property is an alternative to the this accessor.

[Visual Basic]
Public Function GetObject( _
   ByVal name As String _
) As Object
public object GetObject(
 string name
public: Object* GetObject(
 String* name
public function GetObject(
   name : String
) : Object;


The case-insensitive name of the object to return.

Return Value

An object from the collection.


The following example returns an object named ArrayList1 from the StaticObjects collection and copies it to an object variable.

[Visual Basic] 
Dim MyObject As Object
MyObject = Application.StaticObjects.GetObject("ArrayList1")

Object MyObject;
MyObject = Application.StaticObjects.GetObject("ArrayList1");

Object* MyObject;
MyObject = Application->StaticObjects->GetObject(S"ArrayList1");

var myObject : Object = Application.StaticObjects.GetObject("ArrayList1")


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpStaticObjectsCollection Class | HttpStaticObjectsCollection Members | System.Web Namespace