HttpStaticObjectsCollection.GetObject(String) 方法

定义

返回集合中具有指定名称的对象。Returns the object with the specified name from the collection. 该属性是 this 访问器的另一选择。This property is an alternative to the this accessor.

public:
 System::Object ^ GetObject(System::String ^ name);
public object GetObject (string name);
member this.GetObject : string -> obj
Public Function GetObject (name As String) As Object

参数

name
String

要返回的对象名(不区分大小写)。The case-insensitive name of the object to return.

返回

该集合中的一个对象。An object from the collection.

示例

下面的示例从StaticObjects集合返回一个名为 ArrayList1 的对象,并将其复制到一个对象变量中。The following example returns an object named ArrayList1 from the StaticObjects collection and copies it to an object variable.

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

Dim MyObject As Object
MyObject = Application.StaticObjects.GetObject("ArrayList1")

适用于