真???? [英] Really????

查看:65
本文介绍了真????的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

没有更简单的方法将字符串转换为

字符串所代表的变量吗?

Is there no easier way to convert a string into the variable that the
string represents?

推荐答案

" Alex Pierson" < AR ****** @ charter.net> schrieb:
"Alex Pierson" <ar******@charter.net> schrieb:
有没有更简单的方法将字符串转换为
字符串代表的变量?
Is there no easier way to convert a string into the variable that the
string represents?




???


-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/ >

VB< URL:http://classicvb.org/petition/>



???

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


抱歉这是一个回复到另一个线程,但是我的问题

就是这个。


我需要将字符串转换为由
$ b表示的值$ b变量与字符串同名。


EG。


Dim str as string =" var1"

dim var1 as integer = 5


我想在这种情况下将str转换为5.


谢谢。


Herfried K. Wagner [MVP]写道:
Sorry that was meant to be a reply to another thread, but my question
is this.

I need to convert a string into a value that is represented by a
variable that has the same name as the string.

EG.

Dim str as string = "var1"
dim var1 as integer = 5

I want to convert str in this case to 5.

Thanks.

Herfried K. Wagner [MVP] wrote:
" Alex Pierson" < AR ****** @ charter.net> schrieb:
"Alex Pierson" <ar******@charter.net> schrieb:
有没有更简单的方法将字符串转换为
字符串代表的变量?
Is there no easier way to convert a string into the variable that the
string represents?



???

-
MS Herfried K. Wagner
MVP< URL:http://dotnet.mvps.org/>
VB< URL:http:// classicvb .org / petition />



???

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>






听起来你可能需要HashTable。


Dim ht As New HashTable

ht.Add(" var1",5)

Dim var1 As Integer = ht(" var1")


" Alex Pierson" < AR ****** @ charter.net>在消息中写道

news:11 ********************** @ f14g2000cwb.googlegr oups.com ...
Sounds like you might need a HashTable.

Dim ht As New HashTable
ht.Add ("var1", 5)
Dim var1 As Integer = ht("var1")

"Alex Pierson" <ar******@charter.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
很抱歉这是对另一个帖子的回复,但我的问题是这个。

我需要将一个字符串转换为一个由与字符串同名的变量。

EG。

Dim str as string =" var1"
dim var1 as integer = 5

我想在这种情况下将str转换为5.

谢谢。

Herfried K. Wagner [MVP]写道:
Sorry that was meant to be a reply to another thread, but my question
is this.

I need to convert a string into a value that is represented by a
variable that has the same name as the string.

EG.

Dim str as string = "var1"
dim var1 as integer = 5

I want to convert str in this case to 5.

Thanks.

Herfried K. Wagner [MVP] wrote:
" Alex Pierson" < AR ****** @ charter.net> schrieb:
"Alex Pierson" <ar******@charter.net> schrieb:
>有没有更简单的方法将字符串转换为
>的变量字符串代表?
> Is there no easier way to convert a string into the variable that the
> string represents?



???

MS Herfried K. Wagner
MVP< URL:http:// dotnet.mvps.org/>
VB< URL:http://classicvb.org/petition/>



???

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>



这篇关于真????的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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