Skip to content

Commit 0816438

Browse files
ClémentClément
authored andcommitted
Improving CList code and test.
1 parent d85e48b commit 0816438

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

source/code/projects/CList/CList/CList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public void RemoveL()
166166
{
167167
Cell cCell = first;
168168
while (
169-
cCell.Next != null && cCell.Next.Next != null
169+
cCell.Next.Next != null
170170
)
171171
{
172172
cCell = cCell.Next;

source/code/projects/CList/CList/Program.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,11 @@ static void Main(string[] args)
152152
myList3.RemoveI(0);
153153
Console.WriteLine("After removing element at index 0:");
154154
Console.WriteLine(myList3);
155-
}
155+
myList3.AddL(11.5);
156+
myList3.AddF(-8.15);
157+
Console.WriteLine(myList3);
158+
myList3.RemoveL();
159+
Console.WriteLine(myList3);
160+
161+
}
156162
}

0 commit comments

Comments
 (0)