This is your first visit inside The Matrix. Welcome!

The Matrix has you…

This place will take you into the mirage of learning C# programming language, without any previous coding experience being required

Follow the White Rabbit…█

Close
Friday, November 24, 2017 16:30

Archive for April, 2017

Instantiation

Wednesday, April 26th, 2017

I have explained a few times already that when we are dealing with objects, most of the times we are not working with the original class itself – the blueprint, but we are actually create copies of it called instances.… Read more

Constructors

Tuesday, April 25th, 2017

In object-oriented programming, when creating objects from given classes, it is sometimes necessary to call some special methods of those classes, known as a constructors.

Constructor of a class is a pseudo-method, which does not have a return type, has the name of the class and is called using the keyword new.… Read more

Properties

Sunday, April 23rd, 2017

In today’s lesson, I will talk about one of the previous lesson’s new concepts. The first subject on the list: fields and properties. According to our beloved MSDN, a property is a member that provides a flexible mechanism to read, write, or compute the value of a private field.… Read more

Classes

Saturday, April 22nd, 2017

At a definition level, classes are objects defined by the keyword class, followed by an identifier (name) and a body (code block), which contains the codes that define the object and its behavior.

Most of the times, classes can contain only four kind of elements:

  • Fields – member variables of a certain type, defined at class level
  • Properties – a special kind of programming constructs which helps us manipulate the fields, and set the properties of the object
  • Methods – they implement the functionality of the object.
Read more

Object oriented programming

Saturday, April 22nd, 2017

Object oriented programming (OOP) is a programming paradigm, which uses objects and their interactions for building computer programs.

Through this concept, programming tries to simulate the real world. In real world, we can have objects like a car, an orange, a dog.… Read more

Recursive functions

Thursday, April 20th, 2017

Recursion is a mathematical concept that defines any object that is contained or defined by itself. That should be the official, academic definition. In simple words, recursive functions are functions that make a call to themselves from within their own body, in order to solve a problem.… Read more

Best practices when using methods and functions

Wednesday, April 19th, 2017

There are two main reasons why methods and functions are even used. First one, which I already mentioned in a few of the previous posts, is code re-usability. The second is modularization of the code, splitting of complex tasks into smaller sub-tasks, which can offer us a better overview of the entire functionality.… Read more

Return operator

Tuesday, April 18th, 2017

In few of our previous lessons, we used functions – methods that not only can be call, perform some action, but also return a value to the caller – the piece of code that called them. You can imagine this as placing the returned value in the place where the function was invoked from.… Read more

Methods and functions signature

Monday, April 17th, 2017

I talked in the previous lesson about methods and functions signatures, and I offered there a brief explanation on the topic. It is time to explain this new concept in more detail. At a basic level, there are only two things that are mandatory to specify a method or function signature: the parameters type and the order in which the parameters are listed.… Read more

Functions and methods overloading

Monday, April 17th, 2017

There are times when we have functions or methods that perform basically the same thing, but use different kind of parameters. So, in other words, there are cases when we have methods with the same name, but with different signatures.… Read more