先来看看定义: // Summary: // Adds an object to the end of the System.Collections.Generic.List<T>. // // Parameters: // item: // The object to be added to the end of the System.Collections.Generic.List<T>. // The value can be null for reference types
C# 向程序新建的窗体中添加控件,控件需要先实例化,然后用controls.add添加到新的窗体中去 Form settingForm = new Form(); setForm deviceSet = new setForm(); settingForm.Controls.Add(deviceSet); settingForm.Show();