Govt. Exams
Entrance Exams
Middleware components handle cross-cutting concerns like authentication, logging, and exception handling in the request pipeline.
ViewState, Session State, Application State, and Cookies are valid state management techniques. Block State is not a standard ASP.NET technique.
ASP.NET Core is cross-platform (Windows, Linux, macOS) and open-source, while ASP.NET Framework is Windows-only.
[HttpGet], [HttpPost], [HttpPut], [HttpDelete] attributes define HTTP methods for controller actions in ASP.NET Core.
Global.asax handles application-level events like Application_Start, Application_End, and Session_Start.
C# supports multiple interface implementation. A class can implement multiple interfaces separated by commas, and must implement all abstract members of each interface.
Abstract classes can have both concrete (implemented) and abstract (unimplemented) methods. They cannot be instantiated directly but can be inherited. This perfectly fits the requirement.
class A { public A() { Console.WriteLine("A"); } }
class B : A { public B() { Console.WriteLine("B"); } }
class C : B { public C() { Console.WriteLine("C"); } }
new C();
Constructor execution follows from parent to child. When C() is called, it implicitly calls B() which calls A(). So output is: A B C. Base class constructors execute before derived class constructors.
IComparable interface requires implementing the CompareTo() method, which defines how objects of the class should be compared for sorting purposes.
Interfaces define contracts that unrelated classes can implement. If classes have common inheritance relationship, abstract classes are better. Interfaces support multiple implementation, making them ideal for unrelated classes.