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
meat meat
NA
6
0
overriding the same method without code duplication
Nov 25 2010 2:15 AM
Hi !
I have several web references in my project .
I created a new class that inherit from those web reference class and I override GetWebResponse from each of those web reference class.
For instance
public class UserServiceProxy : .UserService
{
protected override WebRequest GetWebRequest(Uri uri)
{
HttpWebRequest webRequest = (HttpWebRequest)base.GetWebRequest(uri);
webRequest.KeepAlive = false;
webRequest.ProtocolVersion = HttpVersion.Version10;
return webRequest;
}
}
How do it prevent code repetition like this in every proxy class that inherit from the web reference
Thanks
Reply
Answers (
1
)
Does anyone know how to zoom a parent and all children?
Using Eval() - To take server side value in client side