PropertyCollection.GetProperty 方法 (Object)

获取与指定键关联的属性。

命名空间:  Microsoft.VisualStudio.Utilities
程序集:  Microsoft.VisualStudio.CoreUtility(在 Microsoft.VisualStudio.CoreUtility.dll 中)

语法

声明
Public Function GetProperty ( _
    key As Object _
) As Object
public Object GetProperty(
    Object key
)
public:
Object^ GetProperty(
    Object^ key
)
member GetProperty : 
        key:Object -> Object
public function GetProperty(
    key : Object
) : Object

参数

  • key
    类型:Object

    键。

返回值

类型:Object
属性值或 nullnull 引用(在 Visual Basic 中为 Nothing) ,如果未设置属性。

异常

异常 条件
ArgumentNullException

key 为 nullnull 引用(在 Visual Basic 中为 Nothing)。

KeyNotFoundException

key 不存在的属性集合。

.NET Framework 安全性

请参阅

参考

PropertyCollection 类

GetProperty 重载

Microsoft.VisualStudio.Utilities 命名空间