Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem visual studio code
Message
From
15/03/2022 15:59:39
 
General information
Forum:
C#
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01683863
Message ID:
01683871
Views:
36
>
>I changed the name of the Tester to Main but I get the same error.
>
>What am I missing?

Try this:
PS - l lied about my age.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Tester tester = new Tester();
            tester.test();
        }

    }
    class Tester
    {
        public void test()
        {
            Console.WriteLine("Veuillez saisir votre prénom.");
            string prenom = Console.ReadLine();
            Console.WriteLine("Veuillez saisir votre age.");
            string age = Console.ReadLine();
            Console.WriteLine("Bonjour " + prenom + ", vous avez " + age + " ans.");
        }
    }
}
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform