谁知道Val()函数的.Net等价物? [英] Who knows the .Net equivalent of the Val() function?

查看:59
本文介绍了谁知道Val()函数的.Net等价物?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从一名前雇员那里继承了一些代码,他们无法从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屋!

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