问题描述
我用ArrayList创建不能成功;
解决方案
解决方案二:
创建动态的如何做啊,谢谢大家了
解决方案三:
List<objet>
解决方案四:
EmpManage[]emp=newEmpManage[100];这个改为动态的怎么改啊?谢谢!
解决方案五:
谢谢!!!
解决方案六:
改改应该有用usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;usingSystem.Collections;namespaceCommonFunc{///<summary>///SummarydescriptionforMiniHashtable///</summary>publicclassMiniHashtable{structStructNameValue{publicObjectitemName;publicObjectitemValue;publicvoidSetValue(ObjectobjName,ObjectobjValue){itemName=objName;itemValue=objValue;}}privateArrayListm_alNV;publicMiniHashtable(){m_alNV=newArrayList();}publicvoidAdd(ObjectobjName,ObjectobjValue){StructNameValuesnvItem=newStructNameValue();snvItem.SetValue(objName,objValue);m_alNV.Add(snvItem);}publicObjectthis[ObjectobjName]{get{for(inti=0;i<m_alNV.Count;i++){StructNameValuesnvItem=(StructNameValue)m_alNV[i];if(snvItem.itemName.Equals(objName))returnsnvItem.itemValue;}returnnull;}}publicObjectthis[intiIndex]{get{if(iIndex<m_alNV.Count){StructNameValuesnvItem=(StructNameValue)m_alNV[iIndex];returnsnvItem.itemValue;}else{returnnull;}}}publicObjectName(intiIndex){if(iIndex<m_alNV.Count){StructNameValuesnvItem=(StructNameValue)m_alNV[iIndex];returnsnvItem.itemName;}else{returnnull;}}publicintLength{get{returnm_alNV.Count;}}publicvoidClear(){m_alNV.Clear();}}}
解决方案七:
谢谢我看看!