concatenationoperator.vb
来自「大名鼎鼎的mono是.NET平台的跨平台(支持linux」· VB 代码 · 共 45 行
VB
45 行
Imports SystemImports System.GlobalizationImports System.ThreadingModule ConcatenationOperator Function Main() As Integer Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US") Dim a As String = "Hello " Dim b As String = "World" Dim c As String = a & b If c <> "Hello World" Then System.Console.WriteLine("#A1-Concatenation Failed") : Return 1 End If c = a & CInt(123) If c <> "Hello 123" Then System.Console.WriteLine("#A2-Concatenation Failed") : Return 1 End If c = a & Nothing If c <> "Hello " Then System.Console.WriteLine("#A3-Concatenation Failed") : Return 1 End If c = Nothing & a If c <> "Hello " Then System.Console.WriteLine("#A4-Concatenation Failed") : Return 1 End If c = a & CDec(123.23) If c <> "Hello 123.23" Then System.Console.WriteLine("#A5-Concatenation Failed") : Return 1 End If c = a & CBool(123) If c <> "Hello True" Then System.Console.WriteLine("#A6-Concatenation Failed") : Return 1 End If End FunctionEnd Module
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?