G
Guest
I am working with a project which converts a java based application into C#. I noticed that when I converted the java file, .net throws a SupportClass for me and since there is no List type in C#, SupportClass tries to use ListCollectionSupport instead. This is working great, except one situation, I got runtime error "Specified cast is not valid", and I am sure the following code caused this error
[Serializable
sealed public class WebOrder : System.Runtime.Serialization.ISerializabl
internal SupportClass.ListCollectionSupport orderItemsList
public EcomWeb.domain.OrderItem[] OrderItem
{
ge
return (EcomWeb.domain.OrderItem[]) orderItemsList.ToArray(ne
EcomWeb.domain.OrderItem[0])
}
public WebOrder():base(
//UPGRADE_ISSUE: Class hierarchy differences between 'java.util.ArrayList'
//'System.Collections.ArrayList' may cause compilation errors
//'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1186"
orderItemsList = new SupportClass.ListCollectionSupport(new System.Collections.ArrayList())
In my original java code, ListCollectionSupport is Java.Util.List type, OrderItem is an abstract Class, both rxItem and octItem are derived from this abstract class
I realy appreciate any reply on this issue and would like to supply anny more information if asked for
Thanks
Daniel
[Serializable
sealed public class WebOrder : System.Runtime.Serialization.ISerializabl
internal SupportClass.ListCollectionSupport orderItemsList
public EcomWeb.domain.OrderItem[] OrderItem
{
ge
return (EcomWeb.domain.OrderItem[]) orderItemsList.ToArray(ne
EcomWeb.domain.OrderItem[0])
}
public WebOrder():base(
//UPGRADE_ISSUE: Class hierarchy differences between 'java.util.ArrayList'
//'System.Collections.ArrayList' may cause compilation errors
//'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1186"
orderItemsList = new SupportClass.ListCollectionSupport(new System.Collections.ArrayList())
In my original java code, ListCollectionSupport is Java.Util.List type, OrderItem is an abstract Class, both rxItem and octItem are derived from this abstract class
I realy appreciate any reply on this issue and would like to supply anny more information if asked for
Thanks
Daniel