So here's the code that I think you'll need to understand what I'm talking about:
Expand|Select|Wrap|Line Numbers
- 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);
- // if (authCode == "-q")
- // break; output.RemoveRange(listNums + 1, output.Capacity - listNums);
- }
- }
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.