First C# Greeting
“A professional language. Your first program. Surprisingly simple.”
A C# console program that asks your name and age — then responds with a personalised message and tells you what year you were born.
It runs in a black console window. Clean. Professional. The same kind of program that real software developers write every day.
You need Visual Studio Community — it’s free.
Go to visualstudio.microsoft.com and download Visual Studio Community. Run the installer and tick “.NET desktop development” then click Install. This is a big download — about 5-10GB. It may take a while.
Prefer to watch? Follow along with the full video.
Watch Greg build the first C# greeting program live — copying the prompt, pasting into ChatGPT, creating the project in Visual Studio, running the code, and making the Vibe Tweak. Pause and rewind as many times as you need.
Enjoying the videos? Subscribe on YouTube for every new lesson →
Copy this. Paste it into your AI. Hit Enter.
Follow these steps exactly.
Don’t panic. Here’s exactly what to do:
Add another question.
Find the section that asks for the user’s name. Add a new line underneath that asks “What is your favourite colour?” and then prints it back in the greeting message.
Your code will look something like this:
Console.WriteLine("What is your name?");
string name = Console.ReadLine();
Console.WriteLine("What is your favourite colour?");
string colour = Console.ReadLine();
Console.WriteLine("Hello, " + name + "! Great to meet you.");
Console.WriteLine("Nice — " + colour + " is a great choice!");
Not sure where to add it? Ask your AI: “Add a question asking for their favourite colour and include it in the greeting.” Paste the updated code back in. Press F5.