相关疑难解决方法(0)

VB6 格式函数:.NET 中的模拟

有一个String.Format函数在文档中被称为FormatVB6 函数的模拟。还有Format来自VisualBasic命名空间的函数是为了兼容性而提供的,并且基本上具有与String.Format.

事实上,这两种格式的日期和数字。

但是 VB6 的函数也能够格式化字符串:

? format$("hi there", ">")
HI THERE
? format$("hI tHeRe", "<")
hi there
? format$("hi there", ">!@@@... not @@@@@")
HI ... not THERE
Run Code Online (Sandbox Code Playgroud)

String.Format就我而言,无法做到这一点,新的Format. 我在兼容性Format文档中也找不到任何提及VB6 功能的某些部分丢失的内容,似乎该功能已被“悄悄地”弃用。

框架中有什么东西可以进行这种类型的格式化吗?

.net vb.net string-formatting vb6-migration

4
推荐指数
1
解决办法
7874
查看次数

标签 统计

.net ×1

string-formatting ×1

vb.net ×1

vb6-migration ×1