Properties (Exercise) – Learn C#

Properties are an elegant way to handle extra logic for getting or setting a field. As opposed to Java’s getter and setter methods, C# has properties which can help you in C# programming. This is an exercise for this YouTube video. Happy learning and good luck!     Assignment: Create a write-only property.     Click … Read moreProperties (Exercise) – Learn C#

Generics (Exercise) – Learn C#

Generics are an amazing feature of C# and many other languages. They enable us to write code once and use it with many different types. What does that mean? Well, let’s find out! This is an exercise for this YouTube video. Happy learning and good luck!   Assignment: Create a method which will reverse the order … Read moreGenerics (Exercise) – Learn C#

Interfaces (Exercise) – Learn C#

Interfaces are a very important part of object oriented programming. How can you assure that a class is exposing a certain method? Well, the methods exposed by a class are collectively called an interface. In C# you can use interfaces to literally simplify your life! This is an exercise for this YouTube video. Happy learning … Read moreInterfaces (Exercise) – Learn C#

Inheritance (Exercise) – Learn C#

When you look into a dictionary, the verb inherit means to derive a quality from parents or ancestors. You know, your mom was tall, your dad was tall and you are likely to be tall too. This is exactly what inheritance does even in programming! It’s nothing scary, just instead of a child who inherits … Read moreInheritance (Exercise) – Learn C#

Classes (Exercise) – Learn C#

Yes, believe it or not, we’re already on the 8th part of this tutorial series. We’ve gone through the absolute basics like variables and loops and now we’re going to enter a brave new world: object oriented programming (OOP). In this tutorial, you will learn why there’s even a need for classes, how to create … Read moreClasses (Exercise) – Learn C#

Methods (Exercise) – Learn C#

This is an exercise for this YouTube video. Happy learning and good luck!     Assignment: Write a method which will add two integers together.     Click to see the answer

      Assignment: Create a method which will be able to either add or subtract two numbers.     Click to see the … Read moreMethods (Exercise) – Learn C#

Multidimensional & Jagged Arrays (Exercise) – Learn C#

This is an exercise for this YouTube video. Happy learning and good luck!   Assignment: Make a 2D jagged array and a 2D multidimensional array with the exact same content using a collection initializer.   Click to see the answer

    Assignment: Print out the contents of both of the arrays from the previous assignment. … Read moreMultidimensional & Jagged Arrays (Exercise) – Learn C#

Onedimensional Arrays (Exercise) – Learn C#

This is an exercise for this YouTube video. Happy learning and good luck!   Assignment: Create 2 identical arrays – one will be “filled up” manually and the other one will use the collection initializer.   Click to see the answer

 

Loops – For, While, Do While (Exercise) – Learn C#

This is an exercise for this YouTube video. Happy learning and good luck!   Assignment: Write code which will sum numbers from 0 to n (inclusively) where n is your made up number.   Click to see the answer

         

If & Switch Statements (Exercise) – Learn C#

This is an exercise for this YouTube video. Happy learning and good luck!   Assignment: Write code which will determine the sign of  a number.     Click to see the answer

        Assignment: Make a simple chatbot using switch statement.     Click to see the answer