Beispiel #1
0
        static void Main(string[] args)
        {
            string location;
            int    sightingcnt;

            string[]        dArray        = new string[20];
            int[]           manateeCnt    = new int[20];
            char            enterMoreData = 'Y';
            ManateeSighting m;

            do
            {
                sightingcnt = GetData(out location, dArray, manateeCnt);
                m           = new ManateeSighting(location, dArray, manateeCnt, sightingcnt);
                Clear();
                WriteLine(m);
                Write("\n\n\n\nDo you want to enter more " +
                      "data - (Enter y or n)? ");
                if (char.TryParse(ReadLine(), out enterMoreData) == false)
                {
                    WriteLine("Invalid data entered - No " +
                              "recorded for your response ");
                }
            }while (enterMoreData == 'Y' || enterMoreData == 'y');
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            string location;
            int sightingCnt;
            string[] dArray = new String[20];
            int[] manateeCnt = new int[20];
            char enterMoreData = 'Y';
            ManateeSighting m;

            do
            {
                sightingCnt = GetData(out location, dArray, manateeCnt);
                            m = new ManateeSighting(location,
                                                    dArray,
                                                    manateeCnt,
                                                    sightingCnt);
                Console.Clear();
                Console.WriteLine(m);

                Console.Write("\n\n\n\nDo you want to enter more data - " +
                              "(Enter y or n)? ");
                if (char.TryParse(Console.ReadLine( ), out enterMoreData) == false)
                    Console.WriteLine("Invalid data entered - " +
                                        "No recorded for your respones");
            } while (enterMoreData == 'y' || enterMoreData == 'y');

            Console.ReadKey();
        }