ComponentDesigner.ShadowPropertyCollection.Item[String] 屬性

定義

取得或設定物件在指定的索引位置。

public:
 property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ propertyName); void set(System::String ^ propertyName, System::Object ^ value); };
public object this[string propertyName] { get; set; }
public object? this[string propertyName] { get; set; }
member this.Item(string) : obj with get, set
Default Public Property Item(propertyName As String) As Object

參數

propertyName
String

收藏中可存取的財產名稱。

屬性值

指定屬性的值,如果它存在於集合中。 否則,該值將從非陰影屬性的當前值中取得。

備註

此方法會回傳物件的當前值,前提是該物件尚未被遮蔽。 因此,判斷該性質是否被 稱為 Contains時被遮蔽非常重要。

適用於