Wednesday , January 17 2018
Home / C# One Year Experienced Interview Questions

C# One Year Experienced Interview Questions

Here I am posting the C# One Year Experienced Interview Questions. i  have searched for so many websites and gathered information from my friends to answer the questions perfectly.i think these questions are very helpful for the people who are trying to get the job on .NET  The most common question for One Year Experienced .

1. What methods are fired during the page load?

1. What methods are fired during the page load?

Init() when the page is instantiated
Load() when the page is loaded into server memory
PreRender()  the brief moment before the page is displayed to the user as HTML
Unload() when page finishes loading.

 

2. What are the different types of Session state management options available with ASP.NET?

2. What are the different types of Session state management options available with ASP.NET?

ASP.NET provides In-Process and Out-of-Process state management. In-Process stores the session in memory on the web server. This requires the a “sticky-server” (or no load-balancing) so that the user is always reconnected to the same web server. Out-of-Process Session state management stores data in an external data source. The external data source may be either a SQL Server or a State Server service. Out-of-Process state management requires that all objects stored in session are serializable.

3. What are the difference between Abstract Class and Interface?

3. What are the difference between Abstract Class and Interface?

Abstract Class:

-Abstract class provides a set of rules to implement next class
-Rules will be provided through abstract methods
-Abstract method does not contain any definition
-While inheriting abstract class all abstract methods must be override
-If a class contains at least one abstract method then it must be declared as an “Abstract Class”
-Abstract classes cannot be instantiated, but a reference cannot be created
-Reference depends on child class object’s memory
-Abstract classes are also called as “Partial abstract classes”
-Partial abstract class may contain functions with body and functions without body
-If a class contains all functions without body then it is called as “Fully Abstract Class” (Interface)

Interface:

-If a class contains all abstract methods then that class is known as “Interface”
-Interfaces support like multiple inheritance
-In interface all methods r public abstract by default
-Interfaces r implementable
-Interfaces cannot be instantiated, but a reference can be created

4. What is the lifespan for items stored in ViewState?

4. What is the lifespan for items stored in ViewState?

Item stored in ViewState exist for the life of the current page. This includes postbacks (to the same page).

5. What is the lifespan for items stored in ViewState?

5. What is the lifespan for items stored in ViewState?

Item stored in ViewState exist for the life of the current page. This includes postbacks (to the same page).

6. What is ViewState?

6. What is ViewState?

ViewState allows the state of objects (serializable) to be stored in a hidden field on the page. ViewState is transported to the client and back to the server, and is not stored on the server or any other external source. ViewState is used the retain the state of server-side objects between postabacks.

7. What is the sequence of execution of the ASP.NET page life cycle?

7. What is the sequence of execution of the ASP.NET page life cycle?

The simple way is to remember SILVER.

  • S (It is not counted)
  • I (Init)
  • L (Load)
  • V (Validate)
  • E (Event)
  • R (Render)

8.What is the difference between a Hash Table and a Dictionary?

8.What is the difference between a Hash Table and a Dictionary?

The main differences are listed below.

Dictionary:

  • Returns an error if the key does not exist
  • No boxing and unboxing
  • Faster than a Hash table

Hashtable:

  • Returns NULL even if the key does not exist
  • Requires boxing and unboxing
  • Slower than a Dictionary

9. What are the state management techniques used in .NET?

9. What are the state management techniques used in .NET?

Client-side:

  • Hidden Field
  • View State
  • Cookies
  • Control State
  • Query Strings

Server-side:

  • Session
    1. In Proc mode
    2. State Server mode
    3. SQL Server mode
    4. Custom mode
  • Application.

10. What are the differences between Application object and session object?

10. What are the differences between Application object and session object?

The session object is used to maintain the session of each user. If one user enter in to the application then they get session id if he leaves from the application then the session id is deleted. If they again enter in to the application they get different session id.
But for application object the id is maintained for whole application.

Pages ( 1 of 5 ): 1 23 ... 5Next »