我有一個包含一個結構作爲關鍵一本字典,我要爲字典如何在C#中使用struct創建字典屬性?
private Dictionary<string, Data> m_dictParam;
struct Data
{
public string MinValue { get; set; }
public string MaxValue { get; set; }
}
我想使用結構
創建字典的財產當我嘗試做這樣創建一個屬性
public Dictionary<string,Data> MinMax
{
get;
set;
}
發生此錯誤:
不一致輔助屬性類型system.Collections.Generic.Dictionary