Contenido del Curso
C# Beyond Basics
C# Beyond Basics
Defining Classes
The syntax for defining a basic class is the following:
index
For example, a class for storing data about houses:
index
The above code contains a class that defines a blueprint for a 'House' object, representing a house that can store the ownerName, land area, country, state, city and street address.
Using objects is very convenient as we can group related information to form a Class and neatly create multiple instances of that data if needed. Using the House
class we can easily store and access data for thousands of houses.
¿Todo estuvo claro?