C#

C# Barrier

C# Barrier class is synchronization primitives used in .NET threading. Barrier is used in an algorithm which composed of multiple phases.  In this Barrier synchronization, we have multiple threads working on a single algorithm. Algorithm works in phases. All threads must complete phase 1 then they can continue to phase 2. …

C# Barrier Read More

Rhino Mocks Tutorial

Rhino Mocks is the mature dynamic mocking framework for .NET unit testing. It create fake/mock implementation of objects behavior at runtime. Rhino Mocks is open source framework and released under the BSD license. Rhino Mocks works on Arrange, Act and Assert (AAA) pattern. Rhino Mocks allows both State verification and Behavior verification of objects. …

Rhino Mocks Tutorial Read More

Environment Setup – Rhino Mocks Tutorial

Rhino Mocks is very easy to setup. There is only one single DLL “Rhino.Mocks.DLL” needs to be included. There are two options to include Rhino Mocks in your solution. Setup solution using Direct download We can directly download “Rhino.Mocks.DLL” from https://www.hibernatingrhinos.com/oss/rhino-mocks Click on the “Download” link in the left Navigation. This will …

Environment Setup – Rhino Mocks Tutorial Read More

Top 10 C# / .NET Multithreading Interview Questions

Question 1. What is the difference between Threads and Tasks? Tasks are wrapper around Thread and ThreadPool classes. Below are some major differences between Threads and Tasks: Question 2. What are Interlocked functions? Interlocked functions in .NET are useful in multithreading programs to safely change the value of shared variables. By default C# variables …

Top 10 C# / .NET Multithreading Interview Questions Read More
LINQ / C#

LINQ Overview

Welcome to LINQ Tutorials. LINQ provides an uniform and powerful SQL like query language in C#/VB.NET to query different data sources. In the tutorial, we will learn all to basics and advanced LINQ language and how to use it your own projects with some live examples. We will go step by …

LINQ Overview Read More
C# / LINQ

LINQ Introduction

LINQ is an acronym for Language Integrated Query. LINQ is introduced in .NET 3.5. Before LINQ, developers need to use different languages for retrieving and saving different data sources. For example if you want to retrieve data from SQL or Oracle database you must learn some basics of SQL query language, …

LINQ Introduction Read More
LINQ / C#

LINQ Basics

Before we start learning LINQ language, we must learn some basic knowledge of most used concepts in LINQ. Sequence A sequence is any collection object that implements the IEnumerable<> interface. LINQ queries only works with the sequences. In the above example, List<string> has implement the IEnumerable interface and countries is the …

LINQ Basics Read More