static void Main(string[] args) { int[] head = new[] { 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 }; LinkList ll = new LinkList(); foreach (var h in head) { ll.PushAfter(h); } Console.WriteLine(GetDecimalValue(ll.head)); Console.ReadKey(); }
static void Main(string[] args) { int[] head = new[] { 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 }; LinkList ll = new LinkList(); foreach (var h in head) { ll.PushAfter(h); } Console.WriteLine(GetDecimalValue(ll.head)); Console.ReadKey(); }