* Type.cs (IsNotPublic): One would normally assume that IsNotPublic == !IsPublic, but this is not the case (note to MS, make better names ;-). Fixes #52547, `Type.IsNotPublic not correct for Nested types' svn path=/trunk/mcs/; revision=21482
@@ -1,3 +1,10 @@
+2003-12-24 Ben Maurer <[email protected]>
+
+ * Type.cs (IsNotPublic): One would normally assume that
+ IsNotPublic == !IsPublic, but this is not the case (note to MS,
+ make better names ;-). Fixes #52547, `Type.IsNotPublic not
+ correct for Nested types'
2003-12-24 Nick Drochak <[email protected]>
* Array.cs (CreateInstance): Throw NullRef exception like .NET 1.1,
@@ -265,7 +265,7 @@ namespace System {
public bool IsNotPublic {
get {
- return !IsPublic;
+ return (Attributes & TypeAttributes.VisibilityMask) == TypeAttributes.NotPublic;
}