I have seen that lots of people get confused with Virtual, Override and new keyword in C#. So I thought it will be a good idea to write a blog post about it. In this blog post we will learn what is virtual, override and new keyword in C# and what’s difference between override and new in C#.
Virtual...
Sunday, October 27, 2013
Tuesday, October 22, 2013
Linq- AddRange Method in C#
In this post I’m going to explain you about Linq AddRange method. This method is quite useful when you want to add multiple elements to a end of list. Following is a method signature for this.
public void AddRange(
IEnumerable<T> collection
)To Understand let’s take simple example like following.
using...
Monday, October 21, 2013
throw new exception- C#
This post will be in response to my older post about throw exception best practice. where one of user asked that I should include throw new exception.So I thought it will be good idea to write a whole blog post for it. This blog post explains what's wrong with throw new exception.
What’s wrong...
Friday, October 18, 2013
throw vs. throw(ex) best practice and difference- c#
Recently I was looking into someone’s code found that they are using the throw(ex) to log exception so I told that person that why you are not using only throw he said there is no difference.. Wait this is not true there is a difference. So, this post is all about throw Vs. throw(ex) best practice...
Thursday, October 17, 2013
Cool Resharper Features Part-2
This post will be part-2 of first post Cool Resharper Features Part-1. In this post we are also going to learn some other cool features that resharper is providing. Following are some of features that resharper is providing.
1) Move to another file to match type name:
This feature makes you very productive...
Saturday, October 12, 2013
Cool Resharper features part -1
I have been using Jetbrain’s resharper since last four years and it’s been my default Visual Studio plugin for visual studio. After this much of experience of resharper I must say if resharper is not there I would not have that much productive with visual studio. Working with it is a pleasure. I this...
Wednesday, October 9, 2013
Database diagram support objects cannot be installed because this database does not have a valid owner- SQL server error solution
Before some days, I have copied one database from the one of server and restored it on my machine. The server was not having ‘sa’ user login and I was having the ‘sa’ user in my local machine. The database was restored perfectly with no problem but when I tried to create a database diagram I got following...