Skip to content

Commit 129dd95

Browse files
committed
Removing redundant method.
1 parent 4b694b5 commit 129dd95

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -239,31 +239,6 @@ public int CountSuccessive(T dataP)
239239
return mCount;
240240
}
241241

242-
// Method to remove at a particular index
243-
// Very similar to RemoveI, simply
244-
// implemented with a different philosophy.
245-
public void RemoveAt(int index)
246-
{
247-
if (index >= 0 && index < Size)
248-
{
249-
if (index == 0)
250-
RemoveF();
251-
else if (index == (Size - 1))
252-
RemoveL();
253-
else
254-
{
255-
Cell cCell = first;
256-
for (int i = 0; i < index - 1; i++)
257-
{
258-
cCell = cCell.Next;
259-
}
260-
cCell.Next = cCell.Next.Next;
261-
}
262-
}
263-
else
264-
throw new ArgumentOutOfRangeException();
265-
}
266-
267242
// Method to reverse a list
268243
public void Reverse()
269244
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static void Main(string[] args)
6060
);
6161
myList1.Reverse();
6262
Console.WriteLine(myList1);
63-
myList1.RemoveAt(1);
63+
myList1.RemoveI(1);
6464
Console.WriteLine(myList1);
6565

6666
myList1.RemoveI(2);

0 commit comments

Comments
 (0)