hello
I need to pass an array of the object com.phone.www.info in a function so I'm trying to create an instance of this object like this:
com.phone.www.Info[] inf = new com.phone.www.Info() ;
I get this error message:
Error 1 Cannot implicitly convert type 'PBX_Admin_Console.com.innovaphone.www.Info' to 'PBX_Admin_Console.com.phone.www.Info[]' C:\Documents and Settings\xavier\My Documents\Visual Studio 2005\Projects\PBX_Admin_Console\PBX_Admin_Console\Form1.cs 29 42 PBX_Admin_Console
Does somebody have an idea about what I did wrong?
Loading
akaii de ShangaiiPosted Jan 10, 2006, 9:34 AM
AnttiPosted Jan 10, 2006, 9:23 AM
You cannot convert from object to object array. Thats very clear. This is the way you create object array:
int size = 10;
com.phone.www.Info[] inf = new com.phone.www.Info[size];
Or you can use .NET 2.0 feature, System.Collections.Generic.List<>:
List infos = new List();