❔ How can I access a member of a different class in a dictionary
Hey! I'm trying to refactor my old JSON serializer code, but I ran into an issue. I can't access a string in another class named
It can't access those 3 strings, and just says that
If I use a
I need it to look like this:
RssTitle. In this Content property, there are 3 different strings that I need to access, RssTitle, RssDesc, and RssPubDate. When I use a dictionary like this:It can't access those 3 strings, and just says that
RssTitle does not exist in the current context. Here is the data model behind this codeIf I use a
List, like this: public List<ContentList> Content { get; set; }, it creates an array in the serialized JSON. I need it to not be an array. Here's what the final JSON looks like:I need it to look like this: