I have a Web service that I'm developing that I'm trying to make as
easy as possible to use.
In my main app (which won't be using the service), I have an account
object class, which in turn has a collection of a business object
class. This is how I'm keeping the appropriate businesses with the
correct user account.
I've been trying to accomplish this in the Web services, but I'm not
having very good luck. I was able to serialize the collection, but in
order to add a business to it I have to ReDim and Preserve the business
collection: ReDim Preserve account.BusinessCollection(1)
account.BusinessCollection(1) = New MyService.Business
Is there a better way?
The client app needs to read, modify, add the account and business
objects.
adbarnet - 31 Jul 2005 12:57 GMT
How about using a different collection class? - an ArrayList will
automatically allocate new space for you - a Hashtable provides fast
lookups, there are a variety of options in the System.Collections namespace.
As long as your serialise method operates on the ICollection or IEnumerable
interface you should be able to pick and choose the best for your own
purposes.
AD
>I have a Web service that I'm developing that I'm trying to make as
> easy as possible to use.
[quoted text clipped - 14 lines]
> The client app needs to read, modify, add the account and business
> objects.