Hi,
Do you have access to the source code of the class? Is the function ReturnNewStockodes
public in the class? What should the ReturnNewStockodes
return i.e. a single clsStockcode or a list of them?
Stockcodes = mag.ReturnNewStockodes("admin", "password")
Would imply a list of clsStockcodes where if you only expected a single one you would do something like this:
Stockcodes.Add(mag.ReturnNewStockodes("admin", "password"))
Also while I was typing I noticed you had used ReturnNewStockodes
not ReturnNewStockCodes
- just in case there is a typo...