Just RUN

A scientist builds in order to learn; an engineer learns in order to build.

有关反射的问题。

 需要注意的是loggerName必须是带名字空间的,要不是建不起来地。 

 public sealed class LoggerManager
 {
  public static Logger GetLogger( string loggerName )
  {
   return (Logger) System.Activator.CreateInstance(Type.GetType(loggerName));
  }
 }

posted on 2004-06-17 15:25    阅读(470)  评论(0编辑  收藏  举报

导航