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
sachin dimbre
NA
15
18.9k
why need implicit operator while creating child class
Oct 25 2013 1:48 PM
Hello,
Why we need implicit operator while creating child class in c sharp?
I am creating wrapper classes(c#) for the classes supported by one Automation tool.
ex. something like "
public class MyClass : ToolClass
" and so on for some other classes also
Concern:
1) Why do I need to add two implicit cast operators and a constructor to the newly created class(MyClass).
public static implicit operator MyClass(Element element);
public static implicit operator MyClass(string path);
2) As MyClass is child of ToolClass it should call this implicitly (as ToolClass is already doing this.)
Thanks in advance...
Reply
Answers (
3
)
generic and generic collection
Make a panel visible on Form1 by clicking a button on Form2