Updated stack to allow for null references to get added
This commit is contained in:
parent
6906d2e764
commit
9de49129e7
@ -11,7 +11,7 @@ namespace C_.Datastructures.Stack
|
|||||||
return new Stack<T>();
|
return new Stack<T>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Stack<T> Create(T value)
|
public static Stack<T> Create(T? value)
|
||||||
{
|
{
|
||||||
//Create a new Stack with a head
|
//Create a new Stack with a head
|
||||||
return new Stack<T>
|
return new Stack<T>
|
||||||
@ -21,7 +21,7 @@ namespace C_.Datastructures.Stack
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Push(T value)
|
public void Push(T? value)
|
||||||
{
|
{
|
||||||
//Add an Item to the top of the stack
|
//Add an Item to the top of the stack
|
||||||
Count++;
|
Count++;
|
||||||
|
Loading…
Reference in New Issue
Block a user