返回属性的名称。
命名空间: Microsoft.VisualStudio.Shell.Interop
程序集: Microsoft.VisualStudio.Shell.11.0(在 Microsoft.VisualStudio.Shell.11.0.dll 中)
Microsoft.VisualStudio.Shell.Interop.10.0(在 Microsoft.VisualStudio.Shell.Interop.10.0.dll 中)
语法
声明
Function GetPropertyName ( _
collectionPath As String, _
index As UInteger, _
<OutAttribute> ByRef propertyName As String _
) As Integer
int GetPropertyName(
string collectionPath,
uint index,
out string propertyName
)
参数
- collectionPath
类型:System.String
[in] 集合的路径。
- index
类型:System.UInt32
[in] 属性的索引集合中的
- propertyName
类型:System.String%
[out] 属性的名称。应将此视为未初始化的 BSTR。此方法分配足够的空间包含该请求的属性的名称。,当不再需要时,调用方应调用 SysFreeString 释放 BSTR。
返回值
类型:System.Int32
,如果属性名称返回,返回 S_OK 。如果集合不存在或索引大于或等于子集合的数量,该方法返回 E_INVALIDARG。
备注
索引是从零开始的,因此,它比可用的属性数应。如果索引表示默认属性,则输出名为空字符串。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。