Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

C# Basics Course (How To)

via Treehouse

Overview

C# is the most popular programming language in the Microsoft ecosystem of products. C# code is designed to run fast and to be easily maintainable. In C# Basics, we'll learn how to work with C# to write simple programs.

What you'll learn

  • C# syntax
  • Types
  • Strings
  • Numbers
  • If statements

Syllabus

C# Syntax

Before we can write C# programs, we need to understand variables and types. This stage will get you started.

Chevron 14 steps
  • Your First C# Program

    3:33

  • Course Overview

    2:37

  • instruction

    Treehouse Features

  • The .NET Framework

    2:34

  • Compile Errors

    5:25

  • Comments

    1:06

  • Hello, World!

    6 questions

  • Variables

    7:09

  • Types

    7:58

  • instruction

    Code Challenges

  • Hello, World!

    1 objective

  • Namespaces

    4:58

  • Variables

    5 questions

  • Types and Namespaces

    7 questions

Methods

This stage will teach you how to do work by calling methods, and how to define your own!

Chevron 13 steps
  • Methods

    6:24

  • Defining methods

    4:14

  • Methods

    7 questions

  • Variable Scope

    3:17

  • Defining a Method

    1 objective

  • Method Arguments

    4:30

  • Method Return Values

    6:30

  • The Difference Between Printing and Returning

    1:42

  • Variable Scope and Method Arguments

    5 questions

  • Returning a Value from the Ask Method

    3:30

  • Method Parameters

    1 objective

  • Return Values

    5 questions

  • Return Values

    1 objective

Strings

Whether it's written in C# or another language, almost all software needs to work with text. Programming languages represent text in the form of strings.

Chevron 7 steps
  • Strings

    0:46

  • String Concatenation

    4:59

  • String Interpolation

    3:18

  • Combining Strings

    1 objective

  • Escape Sequences

    2:58

  • Strings

    5 questions

  • Escape Sequences

    1 objective

Numbers

Programming languages use strings a lot, but they use numbers even more often. Almost any language will let you do addition, subtraction, multiplication, division, and many other math operations. And C# is no exception.

Chevron 6 steps
  • Math Operations

    9:14

  • Numeric Types and Casting

    4:39

  • Numeric Types and Casting

    1 objective

  • Operator Precedence

    1:55

  • Converting Strings to Numbers

    4:14

  • Math Operations and Converting Types

    5 questions

If Statements

Our last requirement is to provide a discount for large orders of cans. But how do we determine which discount to apply?

Chevron 7 steps
  • Comparison Operators

    8:13

  • "if" Statements

    7:29

  • "if" Statements

    4 questions

  • "else if" and "else"

    6:29

  • "if" Statements

    1 objective

  • Course Summary

    1:21

  • "else if" and "else" Statements

    1 objective

Taught by

Jay McGavren

Reviews

Start your review of C# Basics Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.