Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7681053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:15:17+00:00 2026-05-31T18:15:17+00:00

So, I have a string array of some random saying and the like, but

  • 0

So, I have a string array of some random saying and the like, but I would like to be able to do something different some of them, such as open a URL. I’ve been racking my brain trying to come up with the best way to do this. I want the ability to add new things, remove some, without having to worry about touching my code, unless perhaps there was a new action or something. The best possible thing I could think of would be to somehow have a multiple dimension string array, so that I can use the strings in the first column, and the action from the second column. Is there a way to do this?

Alternatively, is there a better way to do what I want?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:15:18+00:00Added an answer on May 31, 2026 at 6:15 pm

    Is there a way to do this?

    No, sorry. Moreover, IMHO, it does not fit your described data model, as “I can use the strings in the first column, and the action from the second column” to me describes two independent string arrays. It may be that I am misinterpreting you, though.

    Alternatively, is there a better way to do what I want?

    If you really do have a dependency between the “columns” (i.e., for each string in the “first column” there is a distinct and largely unique set of actions from the “second column”), use an XML resource in res/xml/, with a structure like:

    <stuff>
      <thing name="foo">
        <action>something</action>
        <action>or</action>
        <action>another</action>
      </thing>
    
      <thing name="bar">
        <action>have</action>
        <action>whatever</action>
        <action>you</action>
        <action>need</action>
      </thing>
    </stuff>
    

    If you need to internationalize the strings, just have separate translations in the XML (e.g., res/xml/, res/xml-es/, res/xml-zh).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an array @horses = [] that I fill with some random horses.
I have some String[] arrays, for example: ['a1', 'a2'] ['b1', 'b2', 'b3', 'b4'] ['c1']
I have an array of strings: var matchThese = [Jabberwocky, Harry Potter, Some other];
I have a mutable array that is retained and storing several objects. At some
I have a string array in C# and I intend to copy it in
I have a string array: string[] authors = new string[3]; authors[0] = Charles Dickens;
I have a string array in C named args[] - now how can I
I have a string array selectCancel with setter and getter methods, which is a
I have a string array which holds the name of 500 stocks. Now i
I have mutable string array named arrayout. It is having 3 element .Now I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.