Complete the code to print "Hello, World!" in C#.
using System; class Program { static void Main() { Console.[1]("Hello, World!"); } }
In C#, Console.WriteLine prints text to the screen with a new line.
Complete the code to declare an integer variable named 'age' with value 25.
int [1] = 25;
Variable names should be meaningful. Here, age is the correct variable name.
Fix the error in the code to correctly declare a string variable with value "C#".
string language = [1]C#[1];
Strings in C# must be enclosed in double quotes "".
Fill the blank to create a simple if statement that checks if number is greater than 10.
if (number [1] 10) { Console.WriteLine("Number is greater"); }
The operator > checks if the left value is greater than the right value.
Fill all three blanks to declare a list of integers and add the number 5 to it.
List<int> numbers = new [1]<int>(); numbers.[2](5); Console.WriteLine(numbers.[3]);
Use List to create a list, Add to add an item, and Count to get the number of items.
