Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / July 2005

Tip: Looking for answers? Try searching our database.

Best way?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg  -- - 25 Jul 2005 18:14 GMT
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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.