// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
// Sebastien Pouliot <sebastien@ximian.com>
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
public AspNetHostingPermissionLevel Level {
get { return _level; }
set {
- if (!Enum.IsDefined (typeof (AspNetHostingPermissionLevel), value)) {
+ if ((value < AspNetHostingPermissionLevel.None) || (value > AspNetHostingPermissionLevel.Unrestricted)) {
string msg = Locale.GetText ("Invalid enum {0}.");
throw new ArgumentException (String.Format (msg, value), "Level");
}