Index (zero based) must be greater than or equal to zero

后端 未结 8 884
灰色年华
灰色年华 2020-12-01 08:32

Hey I keep getting an error:

Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-01 09:11

    using System;
    
    namespace ConsoleApp1
    {
        class Program
        {
            static void Main()
            {
                Console.WriteLine("Enter Your FirstName ");
                String FirstName = Console.ReadLine();
    
                Console.WriteLine("Enter Your LastName ");
                String LastName = Console.ReadLine();
                Console.ReadLine();
    
                Console.WriteLine("Hello {0}, {1} ", FirstName, LastName);
                Console.ReadLine();
    
            }
        }
    }
    

提交回复
热议问题