namespace ConsoleApplication5
{
class Test
{
public void Print()
{
Console.WriteLine("?");
}
}
class Program
{
static void Main(string[] args)
{
//네임스페이스.클래스명
Type type = Type.GetType("ConsoleApplication5.Test");
Test instance = Activator.CreateInstance(type) as Test;
instance.Print();
}
}
}
'프로그래밍 > C#' 카테고리의 다른 글
| 가중치 랜덤 생성 (0) | 2018.03.13 |
|---|---|
| 이진탐색 (0) | 2018.03.11 |
| c# ref , out 키워드의 차이 (0) | 2016.12.30 |
| c++ 의 템플릿과 c#의 제네릭 (0) | 2016.12.29 |
| c# 개념에대해 정리가 잘된곳 (0) | 2016.11.02 |