Ask a Question related to ASP.NET Web Services, Design and Development.
-
Greg -- #1
Best way?
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.
Greg -- Guest
-
adbarnet #2
Re: Best way?
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
"Greg --" <metal480@gmail.com> wrote in message
news:1122311662.729694.223780@g43g2000cwa.googlegr oups.com...>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.
>
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
[url]http://www.usenet.com[/url]
adbarnet Guest



Reply With Quote

