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 Index

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 Index

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 Index

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 Index

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 + c2.Real, Imaginary = c1.Imaginary + c2.Imaginary };

}



// unary operator overloading

public static Complex operator -(Complex c)

{

return new Complex() { Real = -c.Real, Imaginary = -c.Imaginary };

}



// cast operator overloading (both implicit and explicit)

public static implicit operator double(Complex c)

{

// return the modulus - sqrt(x^2 + y^2)

return Math.Sqrt(Math.Pow(c.Real, 2) + Math.Pow(c.Imaginary, 2));

}



public static explicit operator string(Complex c)

{

// we should be overloading the ToString() method, but this is just a demonstration

return c.Real.ToString() + " + " + c.Imaginary.ToString() + "i";

}

}



public class StaticDemo

{

public static void Main()

{

Complex number1 = new Complex() { Real = 1, Imaginary = 2 };

Complex number2 = new Complex() { Real = 4, Imaginary = 10 };

Complex number3 = number1 + number2; // number3 now has Real = 5, Imaginary = 12



number3 = -number3; // number3 now has Real = -5, Imaginary = -12

double testNumber = number3; // testNumber will be set to the absolute value of number3

Console.WriteLine((string)number3); // This will print "-5 + -12i".

// The cast to string was needed because that was an explicit cast operator.

}

}

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 + c2.Real, Imaginary = c1.Imaginary + c2.Imaginary };

}



// unary operator overloading

public static Complex operator -(Complex c)

{

return new Complex() { Real = -c.Real, Imaginary = -c.Imaginary };

}



// cast operator overloading (both implicit and explicit)

public static implicit operator double(Complex c)

{

// return the modulus - sqrt(x^2 + y^2)

return Math.Sqrt(Math.Pow(c.Real, 2) + Math.Pow(c.Imaginary, 2));

}



public static explicit operator string(Complex c)

{

// we should be overloading the ToString() method, but this is just a demonstration

return c.Real.ToString() + " + " + c.Imaginary.ToString() + "i";

}

}



public class StaticDemo

{

public static void Main()

{

Complex number1 = new Complex() { Real = 1, Imaginary = 2 };

Complex number2 = new Complex() { Real = 4, Imaginary = 10 };

Complex number3 = number1 + number2; // number3 now has Real = 5, Imaginary = 12



number3 = -number3; // number3 now has Real = -5, Imaginary = -12

double testNumber = number3; // testNumber will be set to the absolute value of number3

Console.WriteLine((string)number3); // This will print "-5 + -12i".

// The cast to string was needed because that was an explicit cast operator.

}

}

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 + c2.Real, Imaginary = c1.Imaginary + c2.Imaginary };

}



// unary operator overloading

public static Complex operator -(Complex c)

{

return new Complex() { Real = -c.Real, Imaginary = -c.Imaginary };

}



// cast operator overloading (both implicit and explicit)

public static implicit operator double(Complex c)

{

// return the modulus - sqrt(x^2 + y^2)

return Math.Sqrt(Math.Pow(c.Real, 2) + Math.Pow(c.Imaginary, 2));

}



public static explicit operator string(Complex c)

{

// we should be overloading the ToString() method, but this is just a demonstration

return c.Real.ToString() + " + " + c.Imaginary.ToString() + "i";

}

}



public class StaticDemo

{

public static void Main()

{

Complex number1 = new Complex() { Real = 1, Imaginary = 2 };

Complex number2 = new Complex() { Real = 4, Imaginary = 10 };

Complex number3 = number1 + number2; // number3 now has Real = 5, Imaginary = 12



number3 = -number3; // number3 now has Real = -5, Imaginary = -12

double testNumber = number3; // testNumber will be set to the absolute value of number3

Console.WriteLine((string)number3); // This will print "-5 + -12i".

// The cast to string was needed because that was an explicit cast operator.

}

}

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 + c2.Real, Imaginary = c1.Imaginary + c2.Imaginary };

}



// unary operator overloading

public static Complex operator -(Complex c)

{

return new Complex() { Real = -c.Real, Imaginary = -c.Imaginary };

}



// cast operator overloading (both implicit and explicit)

public static implicit operator double(Complex c)

{

// return the modulus - sqrt(x^2 + y^2)

return Math.Sqrt(Math.Pow(c.Real, 2) + Math.Pow(c.Imaginary, 2));

}



public static explicit operator string(Complex c)

{

// we should be overloading the ToString() method, but this is just a demonstration

return c.Real.ToString() + " + " + c.Imaginary.ToString() + "i";

}

}



public class StaticDemo

{

public static void Main()

{

Complex number1 = new Complex() { Real = 1, Imaginary = 2 };

Complex number2 = new Complex() { Real = 4, Imaginary = 10 };

Complex number3 = number1 + number2; // number3 now has Real = 5, Imaginary = 12



number3 = -number3; // number3 now has Real = -5, Imaginary = -12

double testNumber = number3; // testNumber will be set to the absolute value of number3

Console.WriteLine((string)number3); // This will print "-5 + -12i".

// The cast to string was needed because that was an explicit cast operator.

}

}

Interview Question part 3

Q 1)Can I deploy the application without deploying the source code on the server?


Ans)yes, After Project Completion we will Publish the Code after published we will give the code deploy the application on the server.
*************************************************************************
Q 2)Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.



Ans) inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension),the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe.

*************************************************************************

Q 3) Can we declare event and delegates in an interface?



Ans)No,we cannot declare delegates in interface however we can declare events in interface.

So interface can only contains the signature of the following members

Methods

Properties

Indexers

Events
Q 1)Can I deploy the application without deploying the source code on the server?


Ans)yes, After Project Completion we will Publish the Code after published we will give the code deploy the application on the server.
*************************************************************************
Q 2)Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.



Ans) inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension),the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe.

*************************************************************************

Q 3) Can we declare event and delegates in an interface?



Ans)No,we cannot declare delegates in interface however we can declare events in interface.

So interface can only contains the signature of the following members

Methods

Properties

Indexers

Events

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?
  • What events fire when binding data to a data grid? What are they good for?
  • Explain how PostBacks work, on both the client-side and server-side. How do I chain my own JavaScript into the client side without losing PostBack functionality?
  • How does ViewState work and why is it either useful or evil?
  • What is the OO relationship between an ASPX page and its CS/VB code behind file in ASP.NET 1.1? in 2.0?
  • What happens from the point an HTTP request is received on a TCP/IP port up until the Page fires the On_Load event?
  • How does IIS communicate at runtime with ASP.NET? Where is ASP.NET at runtime in IIS5? IIS6?
  • What is an assembly binding redirect? Where are the places an administrator or developer can affect how assembly binding policy is applied?
  • Compare and contrast LoadLibrary(), CoCreateInstance(), CreateObject() and Assembly.Load().
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?
  • What events fire when binding data to a data grid? What are they good for?
  • Explain how PostBacks work, on both the client-side and server-side. How do I chain my own JavaScript into the client side without losing PostBack functionality?
  • How does ViewState work and why is it either useful or evil?
  • What is the OO relationship between an ASPX page and its CS/VB code behind file in ASP.NET 1.1? in 2.0?
  • What happens from the point an HTTP request is received on a TCP/IP port up until the Page fires the On_Load event?
  • How does IIS communicate at runtime with ASP.NET? Where is ASP.NET at runtime in IIS5? IIS6?
  • What is an assembly binding redirect? Where are the places an administrator or developer can affect how assembly binding policy is applied?
  • Compare and contrast LoadLibrary(), CoCreateInstance(), CreateObject() and Assembly.Load().

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?
  • What events fire when binding data to a data grid? What are they good for?
  • Explain how PostBacks work, on both the client-side and server-side. How do I chain my own JavaScript into the client side without losing PostBack functionality?
  • How does ViewState work and why is it either useful or evil?
  • What is the OO relationship between an ASPX page and its CS/VB code behind file in ASP.NET 1.1? in 2.0?
  • What happens from the point an HTTP request is received on a TCP/IP port up until the Page fires the On_Load event?
  • How does IIS communicate at runtime with ASP.NET? Where is ASP.NET at runtime in IIS5? IIS6?
  • What is an assembly binding redirect? Where are the places an administrator or developer can affect how assembly binding policy is applied?
  • Compare and contrast LoadLibrary(), CoCreateInstance(), CreateObject() and Assembly.Load().
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?
  • What events fire when binding data to a data grid? What are they good for?
  • Explain how PostBacks work, on both the client-side and server-side. How do I chain my own JavaScript into the client side without losing PostBack functionality?
  • How does ViewState work and why is it either useful or evil?
  • What is the OO relationship between an ASPX page and its CS/VB code behind file in ASP.NET 1.1? in 2.0?
  • What happens from the point an HTTP request is received on a TCP/IP port up until the Page fires the On_Load event?
  • How does IIS communicate at runtime with ASP.NET? Where is ASP.NET at runtime in IIS5? IIS6?
  • What is an assembly binding redirect? Where are the places an administrator or developer can affect how assembly binding policy is applied?
  • Compare and contrast LoadLibrary(), CoCreateInstance(), CreateObject() and Assembly.Load().