Let say we have a struct as defined below;
internal struct MyStruct
{
public int Id { get; set; }
public string Name { get; set; }
}
Which is used in the class;
internal class MyClass
{
public MyStruct myStruct { get; set; }
}
Retrieving and updating Dictionary can be done as;
MyClass m = new MyClass();
var required = m.myStruct.Id;
Dictionary<int, string> dict = new Dictionary<int, string>();
dict.Add(required, m.myStruct.Name);