Class

The template that describes what data and actions its objects will have.

What is Class?

A class is the template for creating objects. It lists the data each object will hold and the methods it will have. One Dog class can create any number of dog objects.

public class Dog
{
    public string Name { get; set; }

    public void Bark() => Console.WriteLine(quot;{Name} says woof!");
}

Level: Novice · More OOP terms at this level

Updated

In other subjects