好吧,对VB.net的热情挡都挡不住,要进一步学习一下喽。
console.write()
输出信息
console.writeline()
输出信息(换行)
代码如下:
Sub Main() Dim myname As String, firstname As String = "云", secondname As String = "金杞" myname = firstname & secondname Console.Write("my name is:" & myname) Dim mybirthday As Date = "1990-05-07" Dim newyearday As Date = "2017-01-01" Dim beforeborn As Boolean beforeborn = newyearday < mybirthday Console.Write(mybirthday) Console.Write("<") Console.Write(newyearday) Console.WriteLine(beforeborn ) Dim myage As Byte = 32, friendage As Byte friendage += 10 Dim myincome As Single = 5500.2, friendincome As Single friendincome = myincome * 12 Console.Write("朋友的收入") Console.WriteLine(friendincome ) Const friendname As String = "小强" Dim campare As Boolean campare = myincome > friendincome And myage < friendage Console.Write("比较结果") Console.WriteLine(campare) End Sub