I have implemented a queue data structure using linked list in C#. I have also associated my implementation with unit tests. Is this implementation correct? Any suggestion?   namespace QueueDataStructure{    internal class Node    {        internal int value;        internal Node next;    }    public class Queue    {        private Node head;        private int size;        public Queue(){}        public void Enqueue(int n)        {            if(head == null) // queue is empty            {                head = new Node{                    value = n,                    next = null                };            }            else // queue has items            {                var oldHead = head;                head = new Node                {                    value = n,                    next = oldHead                };            }            size++;        }        public int? Dequeue()        {            if (size == 0)                return null;            var node = head;            Node previous = node;            while (node.next != null)            {                previous = node;                node = node.next;            }            previous.next = null;            size--;            return node.value;        }        public int Count        {            get { return size; }        }        public string PrintElements()        {            var node = head;            int[] elements = new int[size];            int i = 0;            while (node != null)            {                elements[i++] = node.value;                node = node.next;            }            return string.Join( , elements);        }    }}using Microsoft.VisualStudio.TestTools.UnitTesting;using QueueDataStructure;namespace TestQueue{    [TestClass]    public class Tests    {        [TestMethod]        public void TestQueue()        {            var queue = new Queue();            Assert.AreEqual(0, queue.Count);            Assert.AreEqual(null, queue.Dequeue());            queue.Enqueue(1);            queue.Enqueue(2);            queue.Enqueue(3);            Assert.AreEqual(3, queue.Count);            Assert.AreEqual(3 2 1, queue.PrintElements());            Assert.AreEqual(1, queue.Dequeue());            Assert.AreEqual(2, queue.Dequeue());            Assert.AreEqual(3, queue.Dequeue());            Assert.AreEqual(0, queue.Count);        }    }}
Queue implementation using linked list
c#;unit testing;linked list;queue