31 строка
400 B
C#
31 строка
400 B
C#
using System;
|
|
|
|
namespace SimpleSample
|
|
{
|
|
public class ToolBoxItem
|
|
{
|
|
public Type Type { get; set; }
|
|
|
|
private object _instance;
|
|
public object Instance
|
|
{
|
|
get
|
|
{
|
|
if (_instance == null)
|
|
{
|
|
_instance = Activator.CreateInstance(Type);
|
|
}
|
|
return _instance;
|
|
}
|
|
}
|
|
|
|
public string Name
|
|
{
|
|
get
|
|
{
|
|
return Type.Name;
|
|
}
|
|
}
|
|
}
|
|
}
|