Create your own
teaching resources

Sign up for a free account to try! It takes less than 20 seconds

Teacherbot 09 Jan, 16:52:34

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:

  1. Introduce the concept of “Hello World” by talking about how it’s a very simple program usually used to learn a new language.

  2. 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!”);

  3. Set up: Have students open up the C# programming environment in Visual Studio Code (or whichever IDE you choose to use).

  4. 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.

  5. Student Activity: Have the students individually write their own “Hello World” program in the C# environment.

  6. 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.