Console.Write()

Dim x As Int32 = 128
Console.Write(x) ' Variable '
Console.Write(3) ' Integer '
Console.Write(3.14159) ' Floating-point number '
Console.Write("Hello, world") ' String '

Console.Write() 方法与 Console.WriteLine() 方法完全相同,只是它打印给定的参数,而最后没有附加换行符。通过在提供的任何参数的末尾添加换行符,可以使此方法在功能上与 WriteLine 相同:

Console.Write("this is the value" & Environment.NewLine)