Tutorials - C#, WPF, ASP.NET MVC, WCF, Entity Framework, AngularJS and MVVM Frameworks - MVVM Light

Wonderful Quotes Android App

Hi Guys Just want to share my new android app "Wonderful Quotes". This app is all about quotes from various philosopher and famous persons around the world. Kindly download and review my app by placing comments in the Google Play Store.  Wonderful Quotes App Link https://play.google.com/store/apps/details?id=com.dotnetpattern.wonderfulquotesap...

Continue Reading

Top LINQ Interview Questions and Answers - Part 2

Question 11. What is the use of into keyword in LINQ? 'into' keyword lets us save the intermediate result into a variable. We can further write LINQ query against this variable. static string[] names = { "Kapil Malhotra", "Michael Jackson", "Miami Sinha" }; static void Main(string[] args) { var result = from name in names ...

Continue Reading

Top LINQ Interview Questions and Answers - Part 1

Question 1. What is LINQ? LINQ stands for Language INtegrated Query. LINQ allows us to write queries over local collection objects and remote data sources like SQL, XML documents etc. We can write LINQ query on any collection class which implements the IEnumerable interface. Question 2. What is Sequence and Query Operators in LINQ? Sequence is a collection class on ...

Continue Reading

Top 10 C# / .NET OOPS Interview Questions and Answers

Question 1. What is Object Oriented Programming (OOPS)? OOPS is a technique to develop modules. These modules are assembled together as software. OOPS works on the objects. Everything in OOPS is object. Object is made up of states and behaviors. Objects communicate with each other by sending messages to each other. Object hierarchy are built using Aggregation and Composit...

Continue Reading

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: A Task can return a result but there is no proper way to return a result from Thread. We can apply chaining on multiple tasks but we can not in threads. We can wait on Tasks without us...

Continue Reading

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. Direct download from hibernatingrhinos site. Use NuGet to download DLL. Setup solution using Direct download We can directly download "Rhino.Mocks.DLL" from ht...

Continue Reading

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...

Continue Reading

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. Until all the threads do not complete the p...

Continue Reading

C# CountdownEvent

C# CountdownEvent is a synchronization primitive which unblocks a waiting thread when its receives signal a certain number of times. CountdownEvent is used in fork-join scenarios. As shown in the above diagram, master thread divides its work into 3 parallel tasks. After all parallel tasks are completed, then it joins its results and control goes back to the mas...

Continue Reading

C# Semaphore

C# semaphore allows only a limited number of threads to enter into a critical section. Semaphore is mainly used in scenarios where we have limited number of resources and we have to limit the number of threads that can use it. How Semaphore Works Semaphores are Int32 variables stored in a operating system resources. When we initialize the semaphore object we initiali...

Continue Reading

Join our newsletter and get an occasional email with a technology and dotnetpattern.com news update.