1. [polldaddy poll=9451835] …


  2. C# Adapter Design Pattern

    Next pattern on my list is called adapter. This is another type of structural pattern. Adapter is the object which lets two mutually incompatible interfaces communicate with each other. Adapter pattern acts as a bridge between two incompatible interfaces. This pattern involves a single class called adapter which is responsible for communication between two independent or incompatible interfaces. …


  3. C# Facade Design Pattern

    5964294206_8e1e34fe28_b


  4. Strategy Pattern C#

    Strategy is a behavioural design pattern, It’s used when Class have different implementation of the method, depended on the context. Here is formal definition of the pattern:

     Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
    In order to understand the concept you should be familiar with principles of object oriented programming. Family of algorithms have the same function but different ways to execute it.  Strategy pattern can select the way of implementing the method from possible options in run time. I’ll be more clear after demonstrating the example.

    UML class diagram:

    Strategy


  5. Singleton Pattern C#

    Singleton Pattern is one the most popular patterns in programming. Singleton is a class which only allows a single instance of itself to be created. It can be very useful, for example when Class contains List of object we don’t want to create new list each time we call the class, and we also want to keep the list private to restrict access and avoid possible corruption. Singleton usually gives simple access to that instance. There are several ways of implementing the pattern, in multi-threading application we must consider case where constructor is called from two thread at the same time, to fix this problem we need to implement thread safety version. Let start with simplest, not thread safe, implementation. …


  6. Review "Level Up The Guide to Great Video Game Design"

    51d5ga-hpl-_sx394_bo1204203200_


  7. C# Async and Await

    This is continuation of article about multi-threading. I previous post i  described basics of multi-threading and how to use threads to perform operations of different cores of CPU. …


  8. C# Statics

    Static keyword is used to access the method or variable without creating instance of the class. Static effectively  means ”associated with a type instead of any one instance of the type”. This keyword can be used in multiple structures. IN this article i’ll focus on static keyword used with methods, classes and variables. First lets take look at variables.

    Static Variables

    Static variables allows to access the values from other class,if its public, without creating the instance of the object. …


  9. C# Closures

    Closures  allows to use variables from outside the scope of action and store values of the variables in memory in order to reuse them later.  A closure in C# takes the form of an in-line delegate. You can find more about lambda expressions in my post about it here.  A closure is attached to its parent method meaning that variables defined in parent’s method body can be referenced from within the anonymous method. It will make more sense after analysing the example. …


  10. C# Enumerations

    In this Tutorial You will learn how to create Enumeration in C#. This is a syntax sugar that helps to store informations in short and meaningful way. It makes code more readable and secure the Fields from invalid inputs. An enumeration is a set of named integer constants. An enumerated type is declared using the enum keyword.

    Enums

    Enums are strongly typed constants. They are essentially unique types that allow you to assign symbolic names to integral values. They are strongly typed, meaning that an enum of one type may not be implicitly assigned to an enum of another type even though the underlying value of their members are the same. Along the same lines, integral types and enums are not implicitly interchangable. All assignments between different enum types and integral types require an explicit cast.
      …