I have the following file:
{ "Ti": 12,
"IES": false,
"End": {
"ABC": "test1",
"XYZ": "test2",
"QWE": "test3"
}
and I have the following C# code that is getting these values through a class:
foreach (var prop in _ABC.GetType().GetProperties())
{
_dic.Add(prop.Name, _ABC.GetType().GetProperty(prop.Name).GetValue(_ABC, null).ToString());
}
This does not give me the values/keys of the dictionary within the existing dictionary. The class ABC looks like following:
public class ABC
{
public string Ti { get; set; }
public string IES { get; set; }
public End End { get; set; }
}
public class END
{
public string ABC { get; set; }
public string XYZ { get; set; }
public string QWE { get; set; }
}
How can I get the loop to go further in to access the values of .END class