1 namespace NSCL
2 {
3 public partial class Form1 : Form
4 {
5 public Form1()
6 {
7 InitializeComponent();
8 this.Load += new EventHandler(Form1_Load);
9 }
10
11 void Form1_Load(object sender, EventArgs e)
12 {
13 GetClassNames();
14 }
15
16 private void GetClassNames()
17 {
18 List<string> clsNames = new List<string>();
19 Assembly asm = Assembly.GetExecutingAssembly();
20
21 foreach (Type t in asm.GetTypes())
22 {
23 if (t.BaseType.Name == "Form")
24 {
25 clsNames.Add(t.Name);
26 }
27 }
28
29 listBox1.DataSource = clsNames;
30 }
31 }
32 }
'개발 > C# .NET' 카테고리의 다른 글
Windows 2008 Server - WCF 404.7 error (0) | 2010.12.28 |
---|---|
C# - Splash Screen 만들기 (0) | 2010.08.16 |
ASP.NET에서 Excel문서에 Cell Color 설정하기 (1) | 2009.11.02 |