Control.ControlCollection.Find(String, Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
依照屬性 Name 搜尋控制項,並建立所有匹配控制項的陣列。
public:
cli::array <System::Windows::Forms::Control ^> ^ Find(System::String ^ key, bool searchAllChildren);
public System.Windows.Forms.Control[] Find(string key, bool searchAllChildren);
member this.Find : string * bool -> System.Windows.Forms.Control[]
Public Function Find (key As String, searchAllChildren As Boolean) As Control()
參數
- key
- String
- searchAllChildren
- Boolean
true搜尋所有兒童控制系統;否則,。 false
傳回
Control[]
一個包含相同控制項的型別 Control 陣列。
例外狀況
key 是 null 空字串(“”)。