Enums were created to declare enumerations and make our life easier. In most cases it does. But in some cases when we following certain patterns, it might be a need in more generic solutions.

Enums were created to declare enumerations and make our life easier. In most cases it does. But in some cases when we following certain patterns, it might be a need in more generic solutions.
In past i being asked a lot in different variation of this same question : public class SaladIngridient { } public class FruitSaladSaladIngridient : SaladIngridient { } public class Salad { public virtual void WhatSaladAreYou(SaladIngridient ingridient) { Console.WriteLine(“Salad with with {0}”, ingridient); } } public class FruitSalad: Salad { public override void WhatSaladAreYou(SaladIngridient ingridient) {… Continue Reading
This tutorial introduce setup process for scheduled tasks in New Relic tool. This tutorial assume that New Relic .NET agent is installed and running. First of all we need to locate file called “CustomInstrumentation.xml”. Usually it can be found under “_installation_path_\New Relic\.NET Agent\Extensions” folder. If this file does not exist, please create one. The content should be… Continue Reading
Enough with the boring stuff ! Today we gonna hide our super secret information in the image file 🙂 Why we might even think about it ? Well, it could be a lot of reasons, but among them is to hide sensitive information or even create invisible watermark. Nowadays a lot of companies deploy such kind… Continue Reading
When it is about performance we should remember it is assumable that in our mind on critical parts (hot paths) which used most frequently. They will produce most noticeable (from performance perspective) results. Related to VB.NET: There are different casts available in VB.NET : DirectCast() – most effective and strict operator among all mentioned below… Continue Reading
It is very important to understand difference between WHERE and JOIN operation in LINQ. WHERE is actually create a Cartesian product, meaning if you working on two tables (Table1 has 100 rows and Table2 has 1000 rows), WHERE condition will evaluates on 100*1000 rows. In contrary JOIN will takes rows from Table1 and will take… Continue Reading
Sometime we need to update UI from a task. In order to update UI we should run or return result in UI thread. But it seems to impossible since all tasks run on threads provided by ThreadPool. But still, we can achieve updating UI from the task by using synchronization context Task Scheduler.
We all worked with ContinueWith() method but there are some interesting and useful facts we should be aware of. First of all lets remember what is Continuation regarding the Tasks. When we looking for this definition in MSDN , we see following:< Creates a continuation that executes asynchronously when the target Task completes.
Developers can define parent-child relationships between task. The main idea is, parent task is completed when all its children tasks are completed.
Today my point of interest is Thread vs Task. Finally i had a little amount of time between projects to dive deeper in order to “examine” the difference. Actually when you ask people what is the difference you hear a lot of different things but the feeling that this point is not organized enough for… Continue Reading