Key Concepts

Review core concepts you need to learn to master this subject

C# Classes

using System; namespace BasicClasses { class Forest { public string name; public int trees; } } // Here we have the Forest class which has two pieces of data, called fields. They are the "name" and "trees" fields.

In C#, classes are used to create custom types. The class defines the kinds of information and methods included in a custom type.

Basic Classes and Objects
Lesson 1 of 2

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo