Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
How to override Add Method of List<> ?
behzad pakniyat
9y
507
1
Reply
Hi
How to override Add Method of List<> ?
public class ccCity : List<cCity>
{
public cCity this[string name]
{
get
{
foreach (cCity item in this)
{
if (item.cvrName==name)
{
return item;
}
}
return null;
}
}
public new void Add(cBaseCVR cvr)
{
this.Add(cvr);
}
}
thanks
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
read x coordinate of chart by clicking on chart
How can I get the hardware audio sample rate in C#?