Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- WebView
- asp.net
- Web Service
- scrollView
- varags
- MS-SQL
- 안드로이드
- 웹 서비스
- C#
- jsp
- STS
- MSsql
- javascript
- 자바스크립트
- MANTIS
- Android
- 자바
- SpringSource Tool Suite
- 웹뷰
- TextBox
- 컬럼명
- Redirect
- decompiler
- Bootstrap
- Java
- Maven
- 이클립스
- html
- Apache Lucene
- Eclipse
Archives
- Today
- Total
bboks.net™
C# LinkedList Example 본문
LinkedList<Node> list = new LinkedList<Node>();
list.AddLast(new Node(3.5));
list.AddLast(new Node(3.6));
list.AddLast(new Node(3.7));
list.AddLast(new Node(3.8));
list.AddLast(new Node(3.9));
list.AddLast(new Node(3.5));
list.AddLast(new Node(3.6));
list.AddLast(new Node(3.7));
list.AddLast(new Node(3.8));
list.AddLast(new Node(3.9));
Node selectedNode = list.ElementAt(4);
LinkedListNode<Node> node = list.Find(selectedNode);
list.AddAfter(node, new Node(2.1));
for (int i = 0; i < list.Count; i++)
{
System.Console.WriteLine(list.ElementAt(i).GetValue());
}
//custom class
class Node
{
double value;
public Node(double value)
{
this.value = value;
}
public double GetValue()
{
return value;
}
public void SetValue(double value)
{
this.value = value;
}
}