Beispiel #1
0
 public static void Main(string[] args)
 {
     Console.WriteLine("this is a CSV Reader and Writer Program");
     _filePath = WriteCsv.GetFilePath();
     ReadOrWriteDecision();
     FileFunctions.LaunchAssociatedFile(_filePath);
 }
Beispiel #2
0
        private static void LoopDataEntry(bool isDone)
        {
            while (isDone)
            {
                Console.WriteLine("Enter name");
                var inputName = Console.ReadLine();
                Console.WriteLine("Enter Age");
                var inputAge = Console.ReadLine();
                WriteCsv.AddRecord(WriteCsv.AppendToRecordIDList(), inputName, inputAge, _filePath);

                Console.WriteLine("Would you like to add more data?");
                Console.WriteLine("'n' or 'no to discontinue");
                var continueInput = Console.ReadLine();
                if (continueInput == "n" || continueInput == "no")
                {
                    isDone = false;
                }
                else
                {
                    Console.WriteLine("Continuing Input");
                }
            }
        }