StringCollection 物件

[與此頁面相關聯的功能Windows 媒體播放機 SDK是舊版功能。 它已被 MediaPlayer 取代MediaPlayer已針對Windows 10和Windows 11進行優化。 Microsoft 強烈建議新程式碼盡可能使用MediaPlayer,而不是Windows 媒體播放機 SDK。 Microsoft 建議盡可能重寫使用舊版 API 的現有程式碼,以使用新的 API。]

StringCollection物件提供操作字串集合的方法。

StringCollection物件支援下列屬性。

屬性 描述
計數 擷取字串集合中的專案數。

 

StringCollection物件支援下列方法。

方法 描述
getAttributeCountByType 擷取與指定 StringCollection 專案索引、屬性名稱和語言相關聯的屬性數目。
getItemInfo 擷取對應至指定 StringCollection 專案索引和名稱的字串。
getItemInfoByType 擷取對應至指定 StringCollection 專案索引、名稱、語言和屬性索引的字串。
isIdentical 擷取值,指出提供的物件是否與目前物件相同。
item 擷取位於指定索引處的字串。

 

StringCollection物件是透過下列方法來存取。

Object 方法
MediaCollection getAttributeStringCollection

 

為了說明, 播放程式mediaCollectiongetAttributeStringCollection (屬性mediaType) 用於參考語法區段中。

另請參閱

腳本的物件模型參考