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 7905461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:29:17+00:00 2026-06-03T10:29:17+00:00

I have fallen into a doubt and I don’t know how to solve it,

  • 0

I have fallen into a doubt and I don’t know how to solve it, the case is:

I have created an “arrayed string” list like this:

List<string[]> definitions;

I have added to it values like this:

definitions.Add(new string[2] { "A", "Def.1" });
definitions.Add(new string[2] { "B", "Def.2" });

In order to show the values I do it like this:

foreach (string[] theDefinition in definitions)
{
Console.WriteLine(theDefinition[0] + "\tdef: " + theDefinition[1]);
}

So far this works fine, but how can I show the values without the foreach I mean something like this:

Console.WriteLine(definitions[0] ...)

What should I write in the 3 dots to show either the “A” or the “Def.1” from the list in index 0.

I guess overcoming this is by doing something like:

string[] temp = definitions[0]
Console.WriteLine(temp[0] + ", " + temp[1]);

How to achieve it just using the Console.WriteLine without using extra variables, is this possible? and how? Thank you in advance.

  • 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-06-03T10:29:23+00:00Added an answer on June 3, 2026 at 10:29 am
    Console.WriteLine(definitions[0][0]  + "\tdef: " + definitions[0][1]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a subkey in the registry, HKEY_LOCAL_MACHINE\SOFTWARE\MyApp\APIConnector . When I load this
So i have fallen into a problem I am able to update values in
I have unfortunately fallen victim to this recent attack: http://www.theregister.co.uk/2011/10/14/mass_website_inection_grows/ . I have found
I have transactional replication running between two databases. I fear they have fallen slightly
Have a look at this picture alt text http://www.abbeylegal.com/downloads/2009-04-01/web%20part%20top%20line.jpg Does anyone know what css
Have you ever created or encountered a self modifying code in Java? If yes,
I have a string I'm writing to the screen one character at a time.
I have items contained in an unordered list. I have hidden divs (using display:none;)
Have written all the code in a silverlight class library (dll) and linked this
I am starting out on a new project and have fallen in love with

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.