Interactive Learning
Browser-based learning platformIntroducing C#
Video · 6:24
Fill in the blanks
In C#, the method is the entry point of a program, and Console. prints a line to the screen.
Your task
The program below has 3 bugs. Click a red-underlined line, type your fix and press Enter. You'll know right away.
1// Fix the errors in this program2using Systemusing System;34namespace HelloApp5{6 class Program7 {8 static void Main(string[] args)9 {10 string role = "Software Developer"string role = "Software Developer";11 Console.WriteLine("Hello, {role}!");Console.WriteLine($"Hello, {role}!");12 }13 }14}
Check results
- using System ends with ;
- Variable declaration ends with ;
- Interpolated string has the $ prefix
