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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:52:57+00:00 2026-05-15T03:52:57+00:00

I have done a program string[] arrExposureValues = stock.ExposureCollection[dt].Values.ToArray(); for(int i = 0; i

  • 0

I have done a program

string[] arrExposureValues = stock.ExposureCollection[dt].Values.ToArray();
for(int i = 0; i < arrExposureValues.Length; i++)
    Console.WriteLine(arrExposureValues[i]);

Nothing wrong and works fine.

But is it possible to do something like the below

for(int i = 0; i < stock.ExposureCollection[dt].Count; i++)    
    Console.WriteLine(stock.ExposureCollection[dt].Values[i]);

This is just for my sake of knowledge (Basically trying to accomplish the same in one line).

Note: ExposureCollection is Dictionary<DateTime, Dictionary<string, string>>

First of all I have the doubt if it is at all possible!

I am using C# 3.0.

Thanks.

  • 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-15T03:52:57+00:00Added an answer on May 15, 2026 at 3:52 am

    First of all, what is you task? Enumerate dictionary and enumerate inner dictionary in the same time?

    foreach(var item in dic)
    {
        foreach(var inner in item.Value)
        {
            Console.WriteLine("key={0}, inner key={1}, inner value={2}",
                item.Key, inner.Key, inner.Value);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have done one program that allow user can listen to the music via
Have you ever done any .net programming? Yes? Good, here's a massive broken program,
I have a program and as it's done now, it has a data directory
I almost done my coding for a specific program i have. I just need
Preface: This is the first real swing program I have done. I have a
I have done a homework assignment, here is the problem statement: Your program should
I have this program that is feeding me data. I take this data (string)
i have done coding in C# but not much inside the Console App (teacher
Here's is what I have done so far but the length function isn't working.
I have done one program in android using xml parsing but there is an

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.