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
loogel
NA
17
0
no polymorphism with references ?
Oct 29 2004 2:08 AM
I am not sure why the following does not work class obj {...} class rocks : obj {...} static int func(ref obj [] list) {...} static void Main(string[] args) { rock []rocks = new rock[10]; {...} //initialize func(ref rocks).ToString()); } it returns the error: "[...] Argument '1': cannot convert from 'ref Polymorphism_ref_test.Class1.rock[]' to 'ref Polymorphism_ref_test.Class1.obj[]'" but this does (the difference is that the argument is not a reference anymore): class obj {...} class rocks: obj {...} static int func(obj [] list) {...} static void Main(string[] args) { rock []rocks = new rock[10]; {...} //initialize funk(rocks); } can anyone tell me why this does not work ?
Reply
Answers (
12
)
about device instance enumeration
Saving fonts - xml