Hope the title of the question explains what I need help on.
So here's the code that I think you'll need to understand what I'm talking about:
So the question I'd be asking is this: How do I get the function "quit" to break the loop1 loop?
The code that I commented out works, but I want to make it into a function to use it again for code later on in the program.
So here's the code that I think you'll need to understand what I'm talking about:
Code:
static void quit(string a, int b, ref List<string> c)
{
if (a == "-q")
c.RemoveRange(b + 1, c.Capacity - b);
}
static void Main(string[] args)
{
listNums = 0
List<string> output = new List<string>();
loop1 = true;
while (loop1)
{
Console.WriteLine("\nEpisode {0}: \nEnter Authentication Code:", epiStart);
authCode = Console.ReadLine();
quit(authCode, listNums, ref output);
[B]// if (authCode == "-q")
// break; output.RemoveRange(listNums + 1, output.Capacity - listNums);[/B]
}
}
The code that I commented out works, but I want to make it into a function to use it again for code later on in the program.