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

Intro – Start Programming – Part 1

Intro – Why is programming so important? There are so many people that get discouraged from programming, because it may seem too difficult. It’s actually way simpler than it...

Posted on by Andraz Krzisnik
C# Tutorial

C# Tutorial: How To Flip an Image Horizontally

Where Do We Start? There are numerous ways you can flip an image horizontally. It’s pretty basic functionality in image processing. I wanted to challenge myself and not just...

Posted on by Andraz Krzisnik