TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ronald Suharta
NA
14
0
how to avoid DRY
Feb 27 2013 4:52 PM
i have a scenario as follow:
public
class
A
:
class
B
{
public
SomeMethodA
()
{
//.... do some logics here
SomeMethodB
();
}
private
SomeMethodB
()
{
//.... do some logics here
}
}
class
B
:
class
C
class
X
:
class
Y
{
public
SomeMethodA
()
{
//.... do some logics here
SomeMethodB
();
}
private
SomeMethodB
()
{
//.... do some logics here
}
}
class
Y
:
class
Z
class A has the exact same method as class X does. Now the question is: How do I combine this method in centralised so that my code has DRY (don't repeat yourself) without modifying/touching class Y, Z and class B, C? Class B, C, Y, and Z are our legacy code and we are NOT trying to alter/modify these classes.
any thoughts?
Reply
Answers (
1
)
Real time use of Model-View-Presenter pattern with Winforms
MVC3 with stored procedure in linqtosql (.dbml)