From d4291ab9ec2a38ff25bd3c9114a420335a8c7296 Mon Sep 17 00:00:00 2001 From: Luke Else Date: Tue, 19 Apr 2022 21:31:29 +0100 Subject: [PATCH] Update Queue to allow for null values to be added --- C#/Datastructures/Queue/Queue.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C#/Datastructures/Queue/Queue.cs b/C#/Datastructures/Queue/Queue.cs index c52da6a..3bffe5f 100644 --- a/C#/Datastructures/Queue/Queue.cs +++ b/C#/Datastructures/Queue/Queue.cs @@ -12,7 +12,7 @@ return new Queue(); } - public static Queue Create(T value) + public static Queue Create(T? value) { //Create a new Queue with a head + tail QueueNode newNode = QueueNode.Create(value, default); @@ -24,7 +24,7 @@ }; } - public void Push(T value) + public void Push(T? value) { //Add an Item to the end of the Queue Count++;