Fix incorrect comment in Queue.Dequeue (#34006)
authorAnton Vasiliev <si1ver1502@gmail.com>
Tue, 24 Mar 2020 12:48:04 +0000 (15:48 +0300)
committerGitHub <noreply@github.com>
Tue, 24 Mar 2020 12:48:04 +0000 (08:48 -0400)
The comment in front of System.Collections.Queue.Dequeue() changed to
match actual routine behavior.

src/libraries/System.Collections.NonGeneric/src/System/Collections/Queue.cs

index 5dbb967..890d83e 100644 (file)
@@ -182,7 +182,7 @@ namespace System.Collections
         }
 
         // Removes the object at the head of the queue and returns it. If the queue
-        // is empty, this method simply returns null.
+        // is empty, this method throws an InvalidOperationException.
         public virtual object? Dequeue()
         {
             if (Count == 0)