Questions
Questions
Solid Principle:
Is used to building great solution make it easy to maintain,
Understand code, easy to modify code.
1) Single Responsibility: Class should have one reason to change.
Ex: Consider Email Sender class that sends mail. It responsible is to
send mail only.
2) Open Close: here you should be able to add new functionality
without changing existing code.
Ex: Suppose using Interface and inheritance you can create like
Account Interface and Class Personal Account, Saving Account that
implemented later also If you wanted add new Account as well.
3) Linsknov subtitution: You should able to use any dervied class
instead of base class without modification.
4) Dependancy Inversion: High level class should not depends on
low lavel class inited of both should depends abstraction.
5) Interface segrigation: client should not be fource to use an
interface which is not relevent to it.
Generic:
Means general form, not specific c# allow to define generic class,
abstract class, field, method, properties, event and operator using
type parameters and without specific data type. typeName<T>
Constructors:
is special method of a class which will invoke automatically
whenever object of class is created. Constructor are responsible for
object initialization a memory allocation of its class.
1) Default Constructor: It is without any parameters.
2) Parameterized Constructor: It has one parameter
3) Copy Constructor: It creates an object by copying variables from
another object.
4) Static Constructor: It is created using a static keyword and will be
invoked only once for all of the instances of the class.
5) Private Constructor: It is created with a private specifier and does
not allow other classes to derive from this class or create an
instance of it.
Generic Collection:
Generic means : hold same Data type.
Ex: List , Dictionary, Stack, Queue
No-Generic : Hold any Data Type
Ex: ArrayList, Hash Table
Abstraction Encapsulation
Solve problem
Solve problem in design level
implementation level
A. C contains Method,
Interface can only contain method fields, constant
Interface
String belongs to
S.B Belongs to sytem.text
system.namespace
Var Dynamic
Delete Truncate
Trigger Procedure
P.K cannot have Null Value Unique constraint may have Null Value
Drop Truncate