Saturday, February 15, 2014

Time difference in SQL SERVER

Find Time Difference of two  Dates using SQL SERVER


Introduction:

Here we going to learn how to obtain the difference of time in terms of sql query in sql server.

Description:

The time difference of two time can be a easy task in terms of sql server, today we going to learn how it can be achieved using simple sql  query.

In my example I am using Toad for SQL Server as a query analyser tool.

Thanks if you have any other doubts are questions please ask and share the knowledge!
Thank you for visiting my blog!

Friday, February 14, 2014

Overloading and Overriding in C#

Overriding and Overloading in C#

Hi, today we going to learn all about the overloading and overriding concepts in c# with example.

Description:

Before going to the overloading and overriding, we have to learn polymorphism, which is the one of the important concept of oops.

Poly means 'many' , morph means 'forms' hence, hence the polymorphism means ability to take many forms.

In polymorphism we can declare the same method name with different arguments in a class and same method name with same arguments in different classes. The polymorphism has the ability to provide different method implementation and that are with the same name.

We have two types of polymorphism, namely

Overloading and Overriding 

Overloading:

In overloading the same name with different signature can be used, thus provides us the benefit of using same name with different tasks. This is also called as compile time polymorphism .

Overriding:

In overriding the method name have same signature can be used in many class with the reference, hence at the runtime only the method and its signatures will be known to the clr.
This is also known as runtime polymorphism.

Overriding an be performed using virtual and override keywords.

Initially we need to create a method with the name virtual and when using the same method name we have to use override keyword.

*signature = parameters

example of overloading:


Example of overriding:



for more information refer my other posts too!
Thank you!