What is a CLR?
CLR is an acronym of common language runtime. It converts the IL code to native code along with JIT compiler. Memory Management, Security, Assembly loading, Threading, Code Access Security are the main responsibilities of CLR.
What are the types of assembly?
-Public or Shared or Global
-Private or Application Specific
-Satellite
What is a shared assembly?
Shared assembly is the one which is installed in Global Assembly Cache (GAC). An assembly can be installed in GAC using gacutil -i AssemblyName.dll. Before using the gacutil command, that assembly should be strong named using sn.exe.
What order global.asax events are triggered?
Global.asax events are triggered in the following order:
Application_BeginRequest
Application_AuthenticateRequest
Application_AuthorizeRequest
Application_ResolveRequestCache
Application_AcquireRequestState
Application_PreRequestHandlerExecute
Application_PreSendRequestHeaders
Application_PreSendRequestContent
<<Code is executed>>
Application_PostRequestHandlerExecute
Application_ReleaseRequestState
Application_UpdateRequestCache
Application_EndRequest.
How can we format data inside Data Grid?
Using DataFormatString property.
What is the difference between “Web.config” and “Machine.Config”?
“Web.config” files apply settings to each web application, while “Machine.config” file apply settings to all ASP.NET applications in the server.
What is the use of “GLOBAL.ASAX” file?
It allows to execute ASP.NET application level events and setting application-level variables.
Which class does the remote object has to inherit?
All remote objects should inherit from System.MarshalbyRefObject.
what are two different types of remote object creation mode in .NET ?
There are two different ways in which object can be created using Remoting:-
• SAO (Server Activated Objects) also called as Well-Known call mode.
• CAO (Client Activated Objects)
SAO has two modes “Single Call” and “Singleton”. With Single Call object, the object is created with every method call thus making the object stateless. With Singleton, the object is created only once and the object is shared with all clients.
CAO are stateful as compared to SAO. In CAO, the creation request is sent from client side. Client holds a proxy to the server object created on server.
What is Marshaling?
Marshaling is used when an object is converted so that it can be sent across the network or across application domains. Unmarshaling creates an object from the marshaled data.
Two Types :
(1) Marshal By Value (MBV)
(2) Marshaling By Reference (MBR)
Is Session_End event supported in all session modes?
Session_End event occurs only in “Inproc mode”. “State Server” and “SQL SERVER” do not have Session_End event.
What are the state maintainence methods in ASP.Net?
- Hidden Fields
- View State
- Cookies
- Query Strings
- Session
What is the ideal size of a cookie?
Cookie size should not exceed 25 to 30% of the Page Size.
What are the difference between abstract class and interface?
Abstract classes are closely related to interfaces. They are classes that cannot be instantiated, and are frequently either partially implemented, or not at all implemented. One key difference between abstract classes and interfaces is that a class may implement an unlimited number of interfaces, but may inherit from only one abstract (or any other kind of) class. A class that is derived from an abstract class may still implement interfaces. Abstract classes are useful when creating components because they allow you specify an invariant level of functionality in some methods, but leave the implementation of other methods until a specific implementation of that class is needed. They also version well, because if additional functionality is needed in derived classes, it can be added to the base class without breaking code.
What is a delegate?
Delegate is a class that can hold a reference to a method or a function. Delegate class has a signature and it can only reference those methods whose signature is compliant with the class. Delegates are type-safe functions pointers or callbacks.
What is compile time and runtime polymorphism?
Method overloading is the example for compile time and method overriding is the example for runtime polymorphism.
What is the default access modifier of a class and its members?
Default Access modifier of a class is internal and default access modifier of the class members is private.
What are the drawbacks of collections in .net?
1. Performance will be low as they store each and every member as an object
2. Incorrect parsing throws runtime "Invalid Cast" exception
Examples of System.Collections: ArrayList, HashTable, Stack, Queue
Note: System.Collections.Generic came up in .NET 2.0 to overcome the drawbacks of collections.
What is Operator overloading in .NET?
It provides a way to define and use operators such as +, -, and / for user-defined classes or structs. It allows us to define/redefine the way operators work with our classes and structs. This allows programmers to make their custom types look and feel like simple types such as int and string.
What is the difference between Authentication and authorization?
Authentication is verifying the identity of a user and authorization is process where we check does this identity have access rights to the system.. Authorization is the process of allowing an authenticated user access to resources.
--------------
CLR is an acronym of common language runtime. It converts the IL code to native code along with JIT compiler. Memory Management, Security, Assembly loading, Threading, Code Access Security are the main responsibilities of CLR.
What are the types of assembly?
-Public or Shared or Global
-Private or Application Specific
-Satellite
What is a shared assembly?
Shared assembly is the one which is installed in Global Assembly Cache (GAC). An assembly can be installed in GAC using gacutil -i AssemblyName.dll. Before using the gacutil command, that assembly should be strong named using sn.exe.
What order global.asax events are triggered?
Global.asax events are triggered in the following order:
Application_BeginRequest
Application_AuthenticateRequest
Application_AuthorizeRequest
Application_ResolveRequestCache
Application_AcquireRequestState
Application_PreRequestHandlerExecute
Application_PreSendRequestHeaders
Application_PreSendRequestContent
<<Code is executed>>
Application_PostRequestHandlerExecute
Application_ReleaseRequestState
Application_UpdateRequestCache
Application_EndRequest.
How can we format data inside Data Grid?
Using DataFormatString property.
What is the difference between “Web.config” and “Machine.Config”?
“Web.config” files apply settings to each web application, while “Machine.config” file apply settings to all ASP.NET applications in the server.
What is the use of “GLOBAL.ASAX” file?
It allows to execute ASP.NET application level events and setting application-level variables.
Which class does the remote object has to inherit?
All remote objects should inherit from System.MarshalbyRefObject.
what are two different types of remote object creation mode in .NET ?
There are two different ways in which object can be created using Remoting:-
• SAO (Server Activated Objects) also called as Well-Known call mode.
• CAO (Client Activated Objects)
SAO has two modes “Single Call” and “Singleton”. With Single Call object, the object is created with every method call thus making the object stateless. With Singleton, the object is created only once and the object is shared with all clients.
CAO are stateful as compared to SAO. In CAO, the creation request is sent from client side. Client holds a proxy to the server object created on server.
What is Marshaling?
Marshaling is used when an object is converted so that it can be sent across the network or across application domains. Unmarshaling creates an object from the marshaled data.
Two Types :
(1) Marshal By Value (MBV)
(2) Marshaling By Reference (MBR)
Is Session_End event supported in all session modes?
Session_End event occurs only in “Inproc mode”. “State Server” and “SQL SERVER” do not have Session_End event.
What are the state maintainence methods in ASP.Net?
- Hidden Fields
- View State
- Cookies
- Query Strings
- Session
What is the ideal size of a cookie?
Cookie size should not exceed 25 to 30% of the Page Size.
What are the difference between abstract class and interface?
Abstract classes are closely related to interfaces. They are classes that cannot be instantiated, and are frequently either partially implemented, or not at all implemented. One key difference between abstract classes and interfaces is that a class may implement an unlimited number of interfaces, but may inherit from only one abstract (or any other kind of) class. A class that is derived from an abstract class may still implement interfaces. Abstract classes are useful when creating components because they allow you specify an invariant level of functionality in some methods, but leave the implementation of other methods until a specific implementation of that class is needed. They also version well, because if additional functionality is needed in derived classes, it can be added to the base class without breaking code.
What is a delegate?
Delegate is a class that can hold a reference to a method or a function. Delegate class has a signature and it can only reference those methods whose signature is compliant with the class. Delegates are type-safe functions pointers or callbacks.
What is compile time and runtime polymorphism?
Method overloading is the example for compile time and method overriding is the example for runtime polymorphism.
What is the default access modifier of a class and its members?
Default Access modifier of a class is internal and default access modifier of the class members is private.
What are the drawbacks of collections in .net?
1. Performance will be low as they store each and every member as an object
2. Incorrect parsing throws runtime "Invalid Cast" exception
Examples of System.Collections: ArrayList, HashTable, Stack, Queue
Note: System.Collections.Generic came up in .NET 2.0 to overcome the drawbacks of collections.
What is Operator overloading in .NET?
It provides a way to define and use operators such as +, -, and / for user-defined classes or structs. It allows us to define/redefine the way operators work with our classes and structs. This allows programmers to make their custom types look and feel like simple types such as int and string.
What is the difference between Authentication and authorization?
Authentication is verifying the identity of a user and authorization is process where we check does this identity have access rights to the system.. Authorization is the process of allowing an authenticated user access to resources.
--------------
What are the differences between const and readonly keywords?
'const':
-cannot be static
-value is evaluated at compile time
-initialized at compile time only
'readonly':
-can't be either instance level or static
-value is evaluated at compile time
-can be initialized in declaration or by code in the constructor
What is a constructor?
-It is used to create objects
-It must have the same name as the class it is declared within
-It may be overloaded
What is the difference between Struct and Class?
Structs are value type variables and thus saved on the stack, additional overhead but faster retrieval. Another difference is that Structs cannot inherit.
What is the advantage of using "using" statement in .net?
It ensures that Dispose is called even if an exception occurs while you are calling methods on the object. It is similar to try and finally block
What is a multicast delegate?
A delegate pointing to more than one function at a time. (i.e., they are based off the System.MulticastDelegate type). A multicast delegate maintains a list of functions that will all be called when the delegate is invoked.
Do constructors have a return type?
No. Constructors can only initialize member variables, but cannot have a return type.
What is the use of operator overloading?
To allow client code to be more concise and readable than it might be with regular methods.
No comments:
Post a Comment