Subject: C#
Title: Introduction To C# Programming – Hello World
Objectives: At the end of this lesson, students will be able to:
• Understand basic C# syntax and structure • Create a simple ‘Hello World’ program in C#
Materials Needed: • Computer • C# IDE (ex. Visual Studio Code)
Anticipatory Set: Teachers can go over some basic definitions and terms associated with programming such as syntax and structure.
Procedure:
-
Introduce the concept of “Hello World” by talking about how it’s a very simple program usually used to learn a new language.
-
Using an example, explain the basic syntax of a C# program that prints: “Hello World”. It should look something like this: Console.WriteLine(“Hello World!”);
-
Set up: Have students open up the C# programming environment in Visual Studio Code (or whichever IDE you choose to use).
-
As a group, write the code for the “Hello World” program together. Make sure to explain the purpose of each element of the code as you go.
-
Student Activity: Have the students individually write their own “Hello World” program in the C# environment.
-
Wrap-Up: Once the students are finished, review their code and check for any errors. Have a discussion about the different ways of writing the same program.
Assessment:
• Observe each student’s code, looking for errors and syntax issues. • Have the students explain their own code and how it works. • Ask the students to write a program that prints out a different message.
Loading...