谁知道Val()函数的.Net等价物? [英] Who knows the .Net equivalent of the Val() function?
问题描述
我从一名前雇员那里继承了一些代码,他们无法从VB6中削减
脐带。他的代码充满了对VB6函数的调用
,如Space(),String(),Left(),Mid(),Right(),Len(),Val()等。 />
我知道除了Val()之外的所有内容的.Net等价物。
Int32.Parse允许你过滤掉像$这样的字符。和,并且
空格,但它仍然不能完全模仿Val()函数。
好吧,谁在这个组中知道答案?
谢谢,
Mike
"和,并且
空格,但它仍然不能完全模仿Val()函数。
好吧,谁在这个组中知道答案?
谢谢,
Mike
*" Mike Wengler" < mikewenglerATprovoxDOTcom> scripsit:我从前雇员那里继承了一些代码,他们无法从VB6上切下脐带。他的代码充满了对VB6函数的调用,如Space(),String(),Left(),Mid(),Right(),Len(),Val()等等。
我希望你不要试图替换这些方便的功能!
我知道除了Val()之外的所有东西的.Net等价物。
没有1:1的替代品可用。
Int32.Parse允许你过滤掉像
< BLOCKQUOTE>"和,和/或空白,但它仍然不能完全模仿Val()函数。
为什么不使用''Val''?这是VB.NET的功能。
-
Herfried K. Wagner [MVP]
< http: //www.mvps.org/dotnet>
I inherited some code from a former employee, who was unable to cut the
umbilical cord from VB6. His code is littered with calls to VB6 functions
like Space(), String(), Left(), Mid(), Right(), Len(), Val(), etc.
I know the .Net equivalents of everything except Val().
Int32.Parse allows you to filter out characters like "$" and "," and
whitespace, but it still can''t emulate the Val() function completely.
Alright, who here in this group knows the answer?
Thanks,
Mike
" and "," and
whitespace, but it still can''t emulate the Val() function completely.
Alright, who here in this group knows the answer?
Thanks,
Mike
* "Mike Wengler" <mikewenglerATprovoxDOTcom> scripsit:I inherited some code from a former employee, who was unable to cut the
umbilical cord from VB6. His code is littered with calls to VB6 functions
like Space(), String(), Left(), Mid(), Right(), Len(), Val(), etc.
I hope you don''t try to replace these handy functions!
I know the .Net equivalents of everything except Val().
There is no 1:1 replacement available.
Int32.Parse allows you to filter out characters like "
" and "," and
whitespace, but it still can''t emulate the Val() function completely.
Why not use ''Val''? It''s a VB.NET function.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
这篇关于谁知道Val()函数的.Net等价物?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!