internal static TypeConverter GetConverter(Type type) {
HostProtectionAttribute protAttrib = new HostProtectionAttribute();
protAttrib.SharedState = true;
CodeAccessPermission permission = (CodeAccessPermission)protAttrib.CreatePermission();
permission.Assert();
try {
return TypeDescriptor.GetConverter(type);
}
finally {
CodeAccessPermission.RevertAssert();
}
}