In this post, We are going to learn about Deferred vs Immediate execution in Linq. There an interesting variations how Linq operators executes and in this post we are going to learn both Deferred execution and immediate execution.
In the Deferred execution query will be executed and evaluated at the time of query variables usage. Let’s take an example to understand Deferred Execution better.
Thursday, June 27, 2013
Wednesday, June 26, 2013
Extending jQuery with jQuery.Extend
We all know that jQuery is a great JavaScript framework. It’s provide lots of functionalities and most used framework in programming world. But sometimes we need a functionality that does not provided by jQuery by default. At that time we need to extend jQuery. We can extend jQuery with jQuery.Extend Method. You can get complete information from the following link.
http://api.jquery.com/jQuery.extend/
It merges the contents of two or more objects together into the first object.
http://api.jquery.com/jQuery.extend/
It merges the contents of two or more objects together into the first object.
Tuesday, June 25, 2013
Static vs Singleton in C# (Difference between Singleton and Static)
Recently I have came across a question what is the difference between Static and Singleton classes. So I thought it will be a good idea to share blog post about it.
Difference between Static and Singleton classes:
- A singleton classes allowed to create a only single instance or particular class. That instance can be treated as normal object. You can pass that object to a method as parameter or you can call the class method with that Singleton object. While static class can have only static methods and you can not pass static class as parameter.
- We can implement the interfaces with the Singleton class while we can not implement the interfaces with static classes.
- We can clone the object of Singleton classes we can not clone the object of static classes.
- Singleton objects stored on heap while static class stored in stack.