22 lines
504 B
C#
22 lines
504 B
C#
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
namespace C_.Datastructures.Nodes
|
||
|
{
|
||
|
internal class StackNode<T>
|
||
|
{
|
||
|
public T? Value { get; set; } = default;
|
||
|
public StackNode<T>? Next { get; set; } = default;
|
||
|
|
||
|
public static StackNode<T> Create(T? value, StackNode<T>? next)
|
||
|
{
|
||
|
return new StackNode<T>
|
||
|
{
|
||
|
Value = value,
|
||
|
Next = next
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
}
|