Results 1 to 3 of 3

Thread: [RESOLVED] How to store many strings?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2008
    Posts
    149

    Resolved [RESOLVED] How to store many strings?

    I've got one function which collect registry keys and store in strings.
    I've got another function which should to iterate through each item(registry key for application) and extract each string(name, location,...) from each item( registry key for application).
    At the end of first function I concatenate each information about one application in one string, and at the beginning of second function split same string.

    Is this the best way or is better to use List<string,string> or Array?
    But I have more than two information I need to store, so I can't use List<string, string>...

  2. #2
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: How to store many strings?

    If you have more than 1 (unrelated) items to store per row, you can create a class/structure with appropriate public properties, and then use List of that class/structure.
    If the two items are related, say they are key/value pair etc. then use more specific class. e.g. Dictionary or HashTable etc.
    The choice of what to use depends entirely on your needs.
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2008
    Posts
    149

    Re: How to store many strings?

    I need to display uninstall string of item, when the name of item is found.

    Ok, I think I got it!

    Thanks for advice.
    Last edited by Blagojce; Feb 17th, 2011 at 10:32 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width