2010-05-04 Miguel de Icaza <miguel@novell.com>
[mono.git] / mcs / class / corlib / System.Collections / Stack.cs
index f4500a0c7d85aef03835656830829531a17fcfe1..9ae8c5b27a359b8a39cf7d76a699d37f25d43250 100644 (file)
@@ -34,11 +34,16 @@ using System.Runtime.InteropServices;
 
 namespace System.Collections {
 
-#if NET_2_0
        [ComVisible(true)]
-#endif
+       [System.Diagnostics.DebuggerDisplay ("Count={Count}")]
+       [System.Diagnostics.DebuggerTypeProxy (typeof (CollectionDebuggerView))]
        [Serializable]
-       public class Stack : ICollection, IEnumerable, ICloneable {
+#if INSIDE_CORLIB
+       public
+#else
+       internal
+#endif
+       class Stack : ICollection, IEnumerable, ICloneable {
 
                // properties
                private object[] contents;
@@ -163,12 +168,12 @@ namespace System.Collections {
                        }
                }
 
-               public static Stack Synchronized(Stack s) {
-                       if (s == null) {
-                               throw new ArgumentNullException();
-                       }
+               public static Stack Synchronized (Stack stack)
+               {
+                       if (stack == null)
+                               throw new ArgumentNullException ("stack");
 
-                       return new SyncStack(s);
+                       return new SyncStack (stack);
                }
 
                public virtual int Count {
@@ -343,7 +348,8 @@ namespace System.Collections {
                        }
                }
 
-               public virtual void Push(Object o) {
+               public virtual void Push (Object obj)
+               {
                        modCount++;
 
                        if (capacity == count) {
@@ -353,7 +359,7 @@ namespace System.Collections {
                        count++;
                        current++;
 
-                       contents[current] = o;
+                       contents[current] = obj;
                }
 
                public virtual object[] ToArray() {