Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Using collections to hold certain data

Ok say that I have 3 separate tasks thes3 tasks hold values.. each task has a value of ..

Task1 (itemname,current quantity,max quantity, user purchase list array)

Example Task1 ("Ball", 23, 51, Customers)

I've looked into using a hashtable in order to do so

Hashtable to set parameters Task (1, 2 , 3, arraylist);

Array list to dynamically control insertion of users and removal. . Sure can do this with hash table not sure yet how it will impact performance wise but if you guys have a better method let me know .. just gathering my idea before i get started this afternoon

Btw..

Task will be in a class of its own .

Rather direct this to Aeon due to his experience with net seal
{ Vi Veri Universum Vivus Vici }
if i understand you can create a custom object:
Code
class Task
{
  string Name{get;set;}
  int CurrentQuantity{get;set;}
  int MaxQuantity{get;set;}
  List<Customer> Customers {get;set;}
  public Task(...)
  {
    Customers = new List<Customer>();
  }

   ---
  struct Customer  //or class if is more complex
  {
    string Name{get;set}
    string Surname {get;set;}
  }



}
Well luckily I actually just fully got a grasp of CSharp.. lol

Anyways list items there should be a dynamic I'm pretty sure correct me if I'm wrong..

Good reply simple and to the point..
{ Vi Veri Universum Vivus Vici }


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by LosesMar 19, 2017 11:05 AM 4 305 Mar 19, 2017 11:05 AM
Last Post: nOrr
[Java] by FolksAug 3, 2016 06:48 AM 5 305 Aug 3, 2016 06:48 AM
Last Post: BeNT-
[Java] by AlbionJan 20, 2015 02:41 AM 0 295 Jan 20, 2015 02:41 AM
Last Post: Albion