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
petre ricardo
NA
194
0
writing update() in the Business Layer {continues with more questions}
Sep 24 2009 6:55 AM
hi,
If code the parameter list as seperate arguments then this wouldnt be a problem, but following a taught pattern that i should take collection as parameters in update or create methods.
Assume the there are three members in a class and in the update or create methods that was told code them to take collection, therefore create and update methods of that class take collection but the problme the caller faces that it doesnt know the order and names of each element of the collection.
Assume :
first element should be Number
second element should be Name
third should be Address
Assume the method signature:
public void Update(Dictionary <string, string> )
but the caller doesnt know that the first element should be Number and the second shold be Name.... therefore if he pass in the wrong order application will fail. How do i indicate to the coder that first element should be Number seocnd Name....?
Is this a good practise?
TY in advance
Reply
Answers (
5
)
c# network programming
A problem that i've faced in an INterview!