C#?б??????????????????
???????????? ???????[ 2014/3/28 16:43:08 ] ????????C# ????
????C#?б?????????????????????
????1.???????
//???????????Sample????????????
foreach (string sp in Enum.GetNames(typeof(Sample)))
{
ary.Add(sp);
}
//???????????Sample?????????
foreach (string sp in Enum.GetValues(typeof(Sample)))
{
ary.Add(sp);
}
????2.????ArrayList(Queue??Stack)
??????????string????????ArrayList?е??????????κ????????????????????ArrayList?е??????????????????
//????????string????????
foreach (string text in arraylist)
{
ary.Add(text);
}
???????????Queue???к?Stack?????????ArrayList????????? ?????????foreach?????????????????????????????????????????????
????3.Winform?????е???
//??????????????е???????????????????????????????
foreach (Control ctl in this.Controls)
{
//??????ж??????????????
if (ctl.GetType().Name.Equals("ListBox") || ctl.Name.Equals("listBox1"))
this.Controls.Remove(ctl);
}
????4.HashTable?????
DictionaryEntry?????????System.Collections
//??????????????е?????
foreach (DictionaryEntry item in hashTable)
{
ary.Add("???????"+item.Key+"????????"+item.Value.ToString());
}
?????????????????????????е???????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11