Code:
while (str != "-1")
{
str = Console.ReadLine();
llist.Insert(str);
//int i = Int32.Parse(str);
}
Console.WriteLine("The total number of nodes in list are :" + llist.Count());
Console.WriteLine("\n");
Console.WriteLine("The data in nodes are : ");
llist.display();
Console.ReadLine();
When inserting how to make sure that how many elements you want to insert, some kind of finishing criteria that after some insertion should come out of insertion operation and display elements.
If i use above criteria so it counts and display "-1" as well so what can be done?
Please help
Thanks