Difference between Constant, read-only and static in C#

In this blog, we will learn about constant, read-only and static keywords in C# programming. We use const and readonly keyword to make a field constant and which values we can not modify. Const keyword We can not modify the value of a field if it is const. Let’s consider the code: This code works … Read more

Exception handling in C#

Exception Handling in C#. Most .NET languages support exception handling. Essentially, when an error occurs in the application, the .NET Framework throws an exception that represents the problem. You can catch this object using an exception handler. If you fail to catch exception, code will be aborted, and the user will see an error message … Read more

When Should We Use Response.Redirect(url,false) in C# code?

In this article, we are going to learn about Response.Redirect() in C#. So, Response.Redirect() may accept 2 parameters, one is the URL and another one is a boolean value i.e. True or False. What is the use of True and False in Response.Redirect? The first parameter in Response.Redirect() define redirection to the next page. And … Read more

Abstract Class Vs Interface in C#

Abstract Class vs Interface

Abstract Class Vs Interface is one of the most asked questions in an interview. In this article, we will learn what are the main differences between abstract class and interface. And also we will know in which cases abstract classes and interfaces can fit in our project. So, let’s start. Abstract Class in C# In … Read more

Getting started with LINQ in C#

What is LINQ? LINQ stands for Language Integrated Query. LINQ defines keywords that you can use to select, filter, sort, group, and transform data. The minor miracle of LINQ is that different LINQ providers allow these keywords to work with different types of data. LINQ to Objects, LINQ to DataSet, LINQ to XML, LINQ to … Read more

Interface explained in easy steps

Interface is similar to a class but with only declaration and no definition. Below are few code to explain interface in easy steps. Interface member can not have definition. They have only declaration. interface ITest{void Method();} All members in interface are by default public. No need to add explicit accessmodifier. interface can not contain fields.In … Read more

Learn OOPS concept in simple and easy way

In this blog, We will see Object Oriented Programming Principal in simple and easy way. What is Object Oriented Programming Concept? Object oriented is an approach to do programming in C#, Java etc. Before object oriented programming structural programming model was in use. C programming language is an example of  structural programming. But the problem … Read more

how to do url rewrite in C#.net. implemented in asp.net4.0 version

how to do url rewrite in C#.net. implemented in asp.net4.0 version Url rewriting is just to display a friendly and readable url instead of a comlex or unfriendly url. Suppose there is a url in your website just like below: http://sharepointcafe.net/Page.aspx?userid=23456 The disadvantages of above mentioned url are: 1. This is not a friendly url.2. … Read more

Can we implement interface with same method name?

Interface is similar to a class, and we implement interface by defining their method in class. Suppose we have same method in more than one interface. In this case there will be a question for interview. Q.    Can we implement interface with same method name?Ans. Yes by using explicit interface implementation. Lets see below … Read more

Gridview row edit, delete and update code in asp.net

As Gridview is a data source control which binds data from backend sql server or any other database table. Here is the code which implements edit, delete and update functionality in a single Gridview. Gridview Edit,Update and Delete functionality code: ASPX Code: <asp:GridView ID=”gvDetails” DataKeyNames=”id” runat=”server” AutoGenerateColumns=”false”                  … Read more