使用C#在哈希表行中添加值 [英] Adding Values In Hash Table Row Wise Using C#
本文介绍了使用C#在哈希表行中添加值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在行表中添加值。
i有3个文本框。我想在哈希表中逐行添加文本框值,例如,
i希望我的哈希表看起来像这样:
1 10 100 -------------- row1
2 20 200 -------------- row2
3 30 300 -------------- row3
I want to add values in hash table row wise.
i have 3 textboxes .i want to add textbox value in hash table row wise like,
i want my hashtable should look like this:
1 10 100 --------------row1
2 20 200 --------------row2
3 30 300 --------------row3
推荐答案
// Creates and initializes a new Hashtable.
Hashtable myTxtHT = new Hashtable();
myTxtHT.Add( "10", "100" );//for the first text box
myTxtHT.Add( "20", "200" );//for the second text box
myTxtHT.Add( "30", "300" );//for the third text box
标记为解决方案,如果它回答你的问题
mark as solution,if it answer your question
这篇关于使用C#在哈希表行中添加值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文