DataStructuresCSharp/C#/Datastructures/Nodes/DoublyLinkedListNode.cs

27 lines
713 B
C#
Raw Normal View History

2022-03-06 09:10:17 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace C_.Datastructures.Nodes
2022-03-06 09:10:17 +00:00
{
internal class DoublyLinkedListNode<T>
2022-03-06 09:10:17 +00:00
{
public T? Value { get; set; } = default;
public DoublyLinkedListNode<T>? Next { get; set; } = default;
2022-03-06 09:10:17 +00:00
public DoublyLinkedListNode<T>? Prev { get; set; } = default;
2022-03-06 09:10:17 +00:00
public static DoublyLinkedListNode<T> Create(T? value, DoublyLinkedListNode<T>? next, DoublyLinkedListNode<T>? prev)
2022-03-06 09:10:17 +00:00
{
return new DoublyLinkedListNode<T>
{
Value = value,
Next = next,
Prev = prev
};
}
}
}