-3
親愛的所有友善的本網站會員。帶有「something」的C#不包含帶有'2'參數的構造函數
我是一個很漂亮的C#程序員,我試着用C#實現一個數據庫項目。
下面是「TableInfo.cs」文件的摘錄(命名爲「AdministrativeDataTransfer」)
當我嘗試構建解決方案有一個編譯器錯誤:
'AdministrativeDataTransfer.AttributeCI' does not contain a constructor that takes '2' arguments;
由於源代碼如下所示,我怎麼解決它?
//attributes of element type
for (int i = 0; i<complexType.Attributes.Count; i++)
{
if (complexType.Attributes[i] is XmlSchemaAttribute)
{
ColumnInfo ci = new AttributeCI((XmlSchemaAttribute)complexType.Attributes[i],this);
m_lstColumns.Add(ci);
m_tblColumns.Add(ci.ElementName, ci);
}
else
{
throw new NotSupportedException();
}
}
我們需要AttributeCI的源代碼問題在於給出瞭如何在這裏調用它的錯誤構造函數 – 2012-01-04 07:42:55
您無法通過問題和答案來學習編程語言。你需要從閱讀一本書開始。 – 2012-01-04 07:46:42
你在調試時運行了這個程序嗎?如果是這樣,你卡在哪裏?我的想法是,這部分的cofe不工作:m_tblColumns.Add(ci.ElementName,ci);你是否可以添加一個ElementName和一些columnInfo到m_tblColumns? – Moonlight 2012-01-04 07:49:07