这是在log4net源码中,用的一种方法
PatternConverter---是一个类
type是一个参数。System.Type
if (!typeof(PatternConverter).IsAssignableFrom(type))
public void AddConverter(string name, Type type)
{
if (name == null) throw new ArgumentNullException("name");
if (type == null) throw new ArgumentNullException("type");
if (!typeof(PatternConverter).IsAssignableFrom(type))
{
throw new ArgumentException("The converter type specified [" + type + "] must be a subclass of log4net.Util.PatternConverter", "type");
}
m_instanceRulesRegistry[name] = type;
}