Shallow copying a list with downcasting
Posted
by Mohit
on Stack Overflow
See other posts from Stack Overflow
or by Mohit
Published on 2010-06-04T12:33:31Z
Indexed on
2010/06/07
5:32 UTC
Read the original article
Hit count: 294
I have the class herichary as follows
CEntity---->CNode--->CElement
I have a
class Nodes : List<Cnode>
and
Class Elements : List<Element>
Node class contain common item common across different project Element class has item specific to a project.
I have to shallow copy the element list into the node list (basically down casting the elements to nodes)
© Stack Overflow or respective owner