IWMPPlaylist.attributeName (VB 和 C#)
[与此页面关联的功能(Windows 媒体播放器 SDK)是旧版功能。 它已被 MediaPlayer 取代。 MediaPlayer 已针对Windows 10和Windows 11进行了优化。 Microsoft 强烈建议新代码尽可能使用 MediaPlayer 而不是 Windows 媒体播放器 SDK。 如果可能,Microsoft 建议重写使用旧 API 的现有代码以使用新 API。]
C# get_attributeName 方法 (attributeName 属性) 获取由索引指定的播放列表属性的名称。
[Visual Basic]
ReadOnly Property attributeName(
lIndex As System.Int32
) As System.String
[C#]
System.String get_attributeName(
System.Int32 lIndex
);
parameters
lIndex
一个 System.Int32 ,它是播放列表属性的索引。
返回值
一个 System.String ,它是播放列表属性的名称。
备注
IWMPPlaylist.attributeName 是 Visual Basic 中采用参数的只读属性,而在 C# 中,它称为 IWMPPlaylist.get_attributeName 方法。
与播放列表关联的属性数由 IWMPPlaylist.attributeCount 属性返回。
此属性返回的名称可以提供给 setItemInfo 或 getItemInfo 方法,以指定或检索命名属性的值。
在使用此属性之前,必须具有对库的读取访问权限。 有关详细信息,请参阅 库访问。
有关 Windows 媒体播放器 支持的属性的详细信息,请参阅属性参考。
示例
有关使用此属性的示例代码,请参阅 attributeCount 属性。
要求
要求 | 值 |
---|---|
版本 |
Windows 媒体播放器 9 系列或更高版本 |
命名空间 |
WMPLib |
程序集 |
|
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈