J
John Smith
Hi All,
(I first posted this question on the csharp.general but got no response, and
since this NG is more active, so I repost it here)
I have two enum definitions from two different namespaces:
namespace ns1
{
public enum e1{
e1a, e1b ......
}
}
namespace ns2
{
public enum e2{
e1a, e1b,... e2a, e2b ...... (i.e. e2 extends the e1's enum)
}
}
Let say in ns1 I have created a array such that
e1[] e1Array=new e1[10];
If I passed the e1Array into a routine, is it possible to cast it into an n2
array, e.g.
e2 e2Array = (e1[]) e1Array. <--- not working.
Anyway get do this?
TIA.
(I first posted this question on the csharp.general but got no response, and
since this NG is more active, so I repost it here)
I have two enum definitions from two different namespaces:
namespace ns1
{
public enum e1{
e1a, e1b ......
}
}
namespace ns2
{
public enum e2{
e1a, e1b,... e2a, e2b ...... (i.e. e2 extends the e1's enum)
}
}
Let say in ns1 I have created a array such that
e1[] e1Array=new e1[10];
If I passed the e1Array into a routine, is it possible to cast it into an n2
array, e.g.
e2 e2Array = (e1[]) e1Array. <--- not working.
Anyway get do this?
TIA.