2005-11-25 Alp Toker <alp@atoker.com>
authorAlp Toker <alp@mono-cvs.ximian.com>
Fri, 25 Nov 2005 06:45:46 +0000 (06:45 -0000)
committerAlp Toker <alp@mono-cvs.ximian.com>
Fri, 25 Nov 2005 06:45:46 +0000 (06:45 -0000)
  * Type.cs (IsVisible): New 2.0 property, implemented recursively.

svn path=/trunk/mcs/; revision=53472

mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/Type.cs

index 7623eec18270ba85934bfe91eb8fdb641249d2cb..98de980323a90642f22fe253e3681e854669ba0c 100644 (file)
@@ -1,3 +1,7 @@
+2005-11-25  Alp Toker  <alp@atoker.com>
+
+       * Type.cs (IsVisible): New 2.0 property, implemented recursively.
+
 2005-11-17  Dick Porter  <dick@ximian.com>
 
        * Environment.cs: Incremented corlib version
index 33528209d2330e93da92cdb03f5bb6f58c330412..570fe6038db17146533d539bec8e2dd64701d4b0 100644 (file)
@@ -1148,6 +1148,18 @@ namespace System {
                        }
                }
 
+               public bool IsVisible {
+                       get {
+                               if (IsNotPublic)
+                                       return false;
+
+                               if (!IsNested)
+                                       return true;
+
+                               return DeclaringType.IsVisible;
+                       }
+               }
+
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                extern int GetGenericParameterPosition ();