This method is used to add an object to the end of the Queue. This comes under the
System.Collections namespace. The value can null and if the Count is less than the capacity of the internal array, this method is an O(1) operation. If the internal array needs to be reallocated to accommodate the new element, this method becomes an O(n) operation, where n is Count.
public virtual void Enqueue (object obj);
Here, obj is the object which is added to the Queue.
Total number of elements in the Queue are : 1 Total number of elements in the Queue are : 2 Total number of elements in the Queue are : 3 Total number of elements in the Queue are : 4 Total number of elements in the Queue are : 5 Total number of elements in the Queue are : 6
- Difference between Method Overriding and Method Hiding in C#
- C# | Uri.IsHexEncoding() Method
- C# | PadLeft() Method
- Anonymous Method in C#
- DateTimeOffset.Add() Method in C#
- Method Hiding in C#
- Stack.Contains() Method in C#
- C# | IndexOfAny() Method
- C# | Method Overloading
- C# | Math.Max() Method
- Extension Method in C#
- C# | Math.Min() Method
- C# | Uri.FromHex() Method
- C# | Math.Log() Method
- DateTime.Add() Method in C#
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.