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 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

Related Questions

Trying to create a simple plugin that simply connects to an ftp site, looks
Im trying to create LinqDataSource that will represent data from dynamically created String list
I am trying create a WCF service that leverages the WPF MediaPlayer on the
Trying to create my first iPhone app that would play back audio. When I
Trying to create several layers of folders at once C:\pie\applepie\recipies\ without using several different
Trying to create a small monitor application that displays current internet usage as percentage
I am trying to visualize how to create a search for an application that
Trying to create an app that does some socket communication (Writing only). I can
Trying to create a grails ant task that has other environments besides prod for
Trying to create an Oracle trigger that runs after a table is updated in

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.