Navigation

Related Articles

Back to Latest Articles

C# Basics – Classes – Part 11

We introduce classes in C# programming language in this tutorial.


Andraz Krzisnik
C# Basics – Classes – Part 11

Classes

Class is basically a container of functions. It can be a separate file or it can be written in the same file as your main project file. We can also create a custom object with properties we define.

We briefly touched the subject of access keywords that determine how accessible is some object or a variable.

  • An object, when set to private, is accessible only within the curly brackets it’s been declared in.
  • An object, when set to public, is accessible from outside the curly brackets it’s been declared in.
  • An object, when set to protected, is accessible only within the curly brackets it’s been declared in and in it’s inherited classes.
Download Examples Next Chapter
Show Comments (0)

Comments

Related Articles

C# Basics

C# Basics – Comments – Part 3

How To Write Comments in C# Programming Language Writing comments into your code has proven to be very useful while investigating and identifying what each part of the code does....

Posted on by Andraz Krzisnik
C# Tutorial

C# Tutorial: How To Convert a Color Image To Grayscale

Grayscale images are basically black and white images. These images are good for programming, since their pixels hold only intensity values or in other words, shades of gray, they...

Posted on by Andraz Krzisnik