Hi there.. You have option strict on. This means that you have to make any type conversion explicit to the system. You can't transform an object to another type (even if they are compatible) unless you specify what type is your destination (this is to avoid any type of conversion error). This is a common practice in languages like C# or even C++, but
Vb always allow implicit conversions. You have 2 ways to solve this. First one, Turn off option strict (in the properties of the project). Second, make the conversions explicits: for example:
Code:
Return ctype(lstCustomers.Items(lstCustomers.SelectedIndex),StructureDemo.Customer)
I always prefer to keep option strict on and make the conversions myself, but you can do whatever you want..
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========