-
Polymorphism
In last post I described Inhabitance, one of four major principles of object oriented programming. Today we will take a look at Polymorphism, second equally important principle. …
-
Inheritance
Today we will take a look at inheritance, one of the four major principles of object oriented programming. Inheritance is used to crate new class based on existing one, which means reuse of properties and method from parent class. It’s important to mention that C# does not support multiple inheritance of classes, but it does support inheritance of multiple interfaces. In c# you can crate chains of connections by inheriting from parent class that inherits from another parent class, this way you can keep properties from multiple classes. …
-
Collections
In last post I wrote about implementation of generics, and the difference between list and an array. Today we will take closer look at Collections. This is more general subject, mentioned earlier generics are part of System.Collection class. …
-
Sum of all natural numbers
Yes, It’s not the most exciting title for a blog post. Lets change it to “is this possible that sum of natural numbers can be equal to fraction, negative fraction, like -1/12?”. …
-
Multithreading
Imagine you need to write a program with a method that takes ages to execute, if you create this in procedural way, the console will freeze and user will be unable to do anything. This problem can be solved by using multiple cores of processor unit. Assign long task to a single core other than the main one. …
-
LitJSON in Unity3D
Creating databases for our game seems to be a difficult task, but LitJSON makes it really easy. Today we will take a look at simple method of reading JSON files. …
-
Level Manager
Today we will take a look how to implement simple Level manager into our game …
-
Events
In last post we discussed implementation of Delegates using one simple example. If you haven’t read it already i strongly encourage you to do so before moving to today’s topic. Today we will take closer look at events. In last example we created one main class with all methods inside it. Today we will learn how to communicate between different classes, by subscribing to the event. …
-
Delegates
Have you ever thought about using method as a parameter? Having ability to invoke multiple methods with one command? Delegates can make those ideas reality . …
-
Introduction to Generics
Have you ever used List class in your program? Did you noticed strange <> brackets in the syntax, brackets where you can pass any type of data? Well, that’s example of practical use of generics. …