Design Patterns:
https://www.c-sharpcorner.com/UploadFile/nipuntomar/creational-design-pattern-for-net/
https://www.c-sharpcorner.com/UploadFile/nipuntomar/structural-design-pattern-for-net/
https://www.c-sharpcorner.com/UploadFile/nipuntomar/behavioral-design-pattern-for-net-part-1/
SOLID Principles:
Single Responsibility Principle (SRP): High cohesion and Loosely couples design is preferred.
refer UDEMY course
--------------------------------------------------------------------------------------------------------------------
Default access specifier of the class members is 'Private
Object class is the 'Default parent class
Base keyword is used to refer to the members of the parent class
Default class access specifier is internal.
Sealed class- can't be inherited further
Sealed method - can't be overridden further.
Static classes are sealed and therefore cannot be inherited.
Q: If we want to make a class not accessible to anyone?
A: Define private constructor
Q: Restrict a class not to be accessible to any other except child class?
A: Define constructor of a class protected.
Q: throw vs throws
A:
throw | throws |
---|---|
throw keyword is used to throw an exception explicitly. | throws keyword is used to declare one or more exceptions, separated by commas. |
Only single exception is thrown by using throw. | Multiple exceptions can be thrown by using throws. |
throw keyword is used within the method. | throws keyword is used with the method signature. |
Read about delegates.
Delegate is a class, which is used to create and invoke delegates at runtime.
A delegate in C# is similar to a function pointer in C or C++
delegates are object-oriented type-safe and very secure as they ensure that the signature of the method being called is correct.
Events and delegates work together. An event is a reference to a delegate i.e. when an event is raised, a delegate is called.
Func, Action & Predicate.
https://www.c-sharpcorner.com/UploadFile/puranindia/C-Sharp-interview-questions/
constant vs readonly
lazy loading vs eager loading
Tasks and threads in .NET and classes
App Domain:
Asp.Net introduces the concept of an Application Domain which is shortly known as AppDomain. It can be considered as a Lightweight process which is both a container and boundary. The .NET runtime uses an AppDomain as a container for code and data, just like the operating system uses a process as a container for code and data. As the operating system uses a process to isolate misbehaving code, the .NET runtime uses an AppDomain to isolate code inside of a secure boundary.
can destructors cause deadlocks
SQL: execution plans
No comments:
Post a Comment