troubleshooting Question

Create a StringDictionary Class

Avatar of adworldmedia
adworldmediaFlag for United States of America asked on
2 Comments1 Solution791 ViewsLast Modified:
I want to be able to create a class type with a StringDictionary as one of the members.

        public class Filter
            public string type = "criterion_filter";
            public NameValueCollection patterns;

            public AdultFilter(string Type, NameValueCollection Patterns)
                this.type = Type;
                NameValueCollection patterns = new NameValueCollection();

Where I can add multiple patterns into the class, which eventually I'll convert into a JSON object that looks like:

“patterns” : {
     “sex” : [ “s”, “e” ],
      “nin” : [“a”],
      “shoes” : [“f”],
      “run” : [“e”]

using the NewtonSoft.Json library...
Miguel Oz
Senior Software Engineer
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros