Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem visual studio code
Message
De
15/03/2022 15:59:39
 
 
Information générale
Forum:
C#
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01683863
Message ID:
01683871
Vues:
37
>
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform