
What is the need for Builder Pattern in C# (C Sharp)?Builder pattern
is used to separate representation from construction of objects. Rather
than deciding what are the entities used in your application, builder
pattern helps you in designing how to present those entities. Assume that
you are dealing with the entity Car in your application. Such construction
details will be maintained in an abstract builder class which can then
be inherited and overridden based on the type of Car. Here is a sample
builder class for Car construction: abstract
class CarBuilder { This builder
class contains abstract methods to define construction of parts of a car.
If you look at the overall architecture of your application, CarClass
and its inherited classes will give you the representation of Car. CarBuilder
and its inherited classes will maintain details about the construction
of Car and its inherited types. Representation and Construction are related
by creating an instance of CarClass as a member of CarBuilder.
_______________________________________________________________________
FREE
Subscription
Subscribe
to our mailing list and receive new articles Note
: We never rent, trade, or sell my email lists to Visit
.NET Programming Tutorial Homepage ______________________________________________________ |