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

  • Home
  • SEARCH
  • 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 319311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:38:59+00:00 2026-05-12T08:38:59+00:00

I was trying to create a visualizer for IDictionary or ICollection Then like the

  • 0

I was trying to create a visualizer for IDictionary or ICollection

Then like the simple visualizer (without dialog; I mean the ususal string visualizer that appears when hovering the variable, see image below), I want to make my custom text, I want to cast the collection to its type’s list (I.E. StringCollection to List(Of String) or List) and then I will be able to see it in the visualizer.
Or for Dictionaries show to lists visualizers for keys and for values.

Any ideas how to implement or even how to start?

I will update my question soon.

This is something I thought about:

using System.Collections.Specialized;
using System.Collections;

namespace ConsoleApplication2
{
    static class Program
    {
        static void Main(string[] args)
        {
            System.Collections.Specialized.StringCollection collection = new StringCollection();
            collection.AddRange(new string[] { "string1", "string2", "sting3" });
            string[] visualizable = collection.ConvertToVisualizableList();

            Dictionary<string,string> dic = new Dictionary<string,string>
            {
              {"key1","value"},
              {"key2","value"}
            };
            string[,]      visualizable2 = dic.ConvertToVisualizableDictionary();



        }

        static string[] ConvertToVisualizableList(this IList collection)
        {
            lock (collection)
            {
                if (collection == null) return null;
                int length = collection.Count;
                string[] list = new string[length];

                for (int i = 0; i < length; i++)
                {
                    object item = collection[i];
                    if (item != null) list[i] = item.ToString();
                }

                return list.ToArray();
            }
        }

        static string[,] ConvertToVisualizableDictionary(this IDictionary dictionary)
        {
            if (dictionary == null) return null;
            int length = dictionary.Count;
            string[,] list = new string[length, 2];

            int i = 0;
            foreach (object item in dictionary.Keys)
            {
                list[i, 0] = item.ToString();
                object value = dictionary[item];
                if(value!=null) list[i, 1] = value.ToString();
                i++;
            }
            return list;
        }
    }
}

These are VS visualizers for array and multidimentional arrays:

alt text

I want to use something similar for ICollection (or IList), IDictionary etc.

Note that in arrays, the visualizer shows every nested objcet.
This is actually what I want to achieve:

d.

Try to visualize a List and you will see that there is a private value _items, so you can see its items.
I want to achieve something similar in collection and dictionary.

  • 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-12T08:38:59+00:00Added an answer on May 12, 2026 at 8:38 am

    There are a number of examples on Code Project. This is the one i have the most experience with: DataSet Visualizer

    i have installed and used it myself so i know it works. Is is more advanced than you need since it actually displays entire ADO data sets but the code should be pretty easy to modify.

    Here are a couple of other links to check out as well:

    Project 1

    Project 2

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

Sidebar

Ask A Question

Stats

  • Questions 287k
  • Answers 287k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Have a look at MySQL Forums :: ODBC :: Row… May 13, 2026 at 5:08 pm
  • Editorial Team
    Editorial Team added an answer So some standard debugging... Set a breakpoint in submitButtonPressed: to… May 13, 2026 at 5:08 pm
  • Editorial Team
    Editorial Team added an answer That isn't a property of the array — it's a… May 13, 2026 at 5:08 pm

Related Questions

I was trying to create a pseudo super struct to print array of structs.
I was trying to create a python wrapper for an tk extension, so I
I was trying to create a mail reader application using haskell. I found HaskellNet
I was trying to create a mouse clicked event of a JmenuItem but it

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.