C# 单链接代码解释

C# 单链接代码解释,c#,singly-linked-list,C#,Singly Linked List,我在一本书中遇到了这种单链表实现。然而,我不明白一些说法。我对每个陈述的问题都列在每个陈述的后面 1 class Node { 2 Node next = null; //Is this a constructor? 3 int data; 4 public Node(int d) { data = d; } 5 void appendToTail(int d) { 6 Node end = new Node(d); 7 Node n = this;//Why

我在一本书中遇到了这种单链表实现。然而,我不明白一些说法。我对每个陈述的问题都列在每个陈述的后面

1 class Node {
2   Node next = null;  //Is this a constructor?
3   int data;
4   public Node(int d) { data = d; }
5   void appendToTail(int d) {
6     Node end = new Node(d);
7     Node n = this;//Why is "this" keyword used here?  What does this do?
8     while (n.next != null) { n = n.next; }//Where does "next" member come from?
9     n.next = end;
10   } 
11 }
2 Node next = null; //Is this a constructor? NO it is not. 
4 public Node(int d) { data = d; } //This is constructor
7 Node n = this; //The this keyword refers to the current instance of the class
8 while (n.next != null) { n = n.next; } //Learn Linked list