shadowing, overloading, and overriding

shadowing, overloading, and overriding Shadowing, similar to Overloads, allows you to define a method that has the same name as another method in a base class, but without having to ensure a different signature. You can also shadow a method that is defined in the same class using the Shadows keyword and a different signature, however this has the similar effect of overloading a method and can be used when your intent is to overload and protect your methods at the same time. And since the Shadows keyword is the default, declaring multiple [...]

Primary Key Vs Unique Key

Primary Key : 1) Clustered index 2) It doesn't allow duplicates & NULL values. Unique Key: 1) Non-clustered Index 2) It doesn't allow duplicates but it allows only one NULL value. Clustered Index : 1) It store the directly value in a B-Tree Format. 2) A table contain only one Clusted Index Non-Clustered Index: 1) It store the Address of the value in a B-Tree Format. 2) A table contain more than one Non-clustered Inde [...]

OOPS Concepts

Operator overloading :C# operator definitions are class members that define or redefine the behavior of basic C# operators (called implicitly or explicitly) on instances of the class: public class Complex { private double re, im; public double Real { get { return re; } set { re = value; } } public double Imaginary { get { return im; } set { im = value; } } // binary operator overloading public static Complex operator +(Complex c1, Complex c2) { return new Complex() { Real = c1.Real [...]

ASP.NET Interview Questions for 3+ years Experience

ASP.NET Interview questions for 3+ years Experience From constructor to destructor (taking into consideration Dispose() and the concept of non-deterministic finalization), what the are events fired as part of the ASP.NET System.Web.UI.Page lifecycle. Why are they important? What interesting things can you do at each? What are ASHX files? What are HttpHandlers? Where can they be configured? What is needed to configure a new extension for use in ASP.NET? For example, what if I wanted my system to serve ASPX files with a *.jsp extension? [...]

Interview Questions Part 2

Q 1)From constructor to destructor (taking into consideration Dispose() and the concept of non-deterministic finalization), what the are events fired as part of the ASP.NET System.Web.UI.Page lifecycle. Why are they important? What interesting things can you do at each?Ans)From constructor to destructor :The .NET Framework's garbage collector manages the allocation and release of memory for our application. Each time we use the new operator to create an object(calls the "constructor"), the runtime allocates memory for the object from the managed [...]

Nested Selects in LINQ to SQL

Consider the following diagram to track the votes in a contest. Each voter can register only one vote (a score from 1 to 4) for each contest entry. For any given voter, you'll want to present a screen showing every entry in the competition, along with the score assigned to the entry by the [...]