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
mkkl
NA
1
0
Copy members of a Parent object to a Child object
Dec 15 2004 2:08 PM
Wondering if there is a easy way in C# that provides copying members of a parent to a child without explicitly coding the copy of each members? This is what I would like to do... public class Person { int age = 0; } public class Manager { } class Test { [STAThread] static void Main(string[] args) { Person p = new Person(); Manager m = new Manager(); p.age = 30; // I know this will not work... but what I wanted to do is to copy the common // denomiated members from parent to child... is there a way without coding // copying of each members? m = p; } }
Reply
Answers (
1
)
Font Question
Any built-in component in C# to FTP?