Tags » Csharp

Run Length Encoding Compression or just Grade 3 Math

Somewhere deep in human history, shortly after we began counting with numbers and before more “complex” math like “x” (multiply) or x/y (divide) were discovered, our brains were working on inventing something new. 803 more words


Sorting Algorithms - Part 1

Merge and Quicksort Sorting Algorithm Tutorial

When you first begin really learning about algorithms one of the first areas of discussion is sorting. There is a great reason for this, everyone sorts something at some point in the day but never really thinks about how they sort. 1,271 more words


One equality operator to rule them all

In a lot of programming languages there are two different concepts for equality: Reference equality (also called Identity) and Value equality.

Reference equality is the same as equality of memory addresses. 1,221 more words

Some polymorphism in C#

I was watching an online C# 6 course by Jesse Liberty¬†and then decided to play a little bit with inheritance, polymorphism, and method binding. The result of that was… 263 more words


Insertion Sort - Part 2

Insertion Sort Algorithm Tutorial

To continue our discussion on sorting algorithms, in part 2 we are going to look at insertion sort. Insertion sort is one of the simplest ways of sorting and is quite different than merge or quicksort. 495 more words


Extension method to retrieve Enumeration description

public static string GetDescription(this Enum value)
    string desc = String.Empty;
    FieldInfo fi = value.GetType().GetField(value.ToString());
    DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false);
    if (attributes != null && attributes.Length > 0)
        desc = attributes[0].Description;
        desc = value.ToString();
    return desc;

Library Management using ASP.Net MVC (Part 3) Adding the Customers

In this article you will learn about Entity Framework code first migration. In the first part we use Entity Framework code first to create the book model. 484 more words