如何为变量设置多个值 [英] how to set multiple values to a variable

查看:133
本文介绍了如何为变量设置多个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个变量x,每次点击一个按钮,它都会显示在文本框中。在另一个文本框(tb1)中以不同的形式输入值后,单击确定按钮时会保存x的值。所以每当我从tb1保存一个新值时,我希望显示新值而不替换旧值。我该怎么做?

i have a variable x which is displayed in a text box every time a button is clicked. the value of x is saved on clicking an ok button after u enter a value in another text box, (tb1) in a different form. so everytime i save a new value from tb1 i want the new value to be shown without replacing the old value. what do i do for this?

推荐答案

我建​​议一个List(字符串)。

在这个列表中你可以附加.add a /新值...
I suggest a List(of string).
In this List you could append by .add a/the new value ...


这篇关于如何为变量设置多个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆