我有以下字典:
private Dictionary<string, double> averages = new Dictionary<string, double>();
现在我想使用反射来添加两个额外的值。我可以检索字段信息,但是还需要做什么?
FieldInfo field = ProjectInformation.SourceManager.GetType().GetField("averages");
if (field != null)
{
//what should be here?
}