VB.NET Program to Print Love Symbol
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Module Module1 Sub Main() Dim a As Integer = 3, i As Integer Console.WriteLine("www.ProgrammingPosts.blogspot.com") Console.WriteLine(vbLf & " >>VB.Net PROGRAM TO PRINT LOVE SYMBOL <<" & vbLf) For i = 0 To 249 'for loop prints love symbol 250 times Console.Write(ChrW(a)) Next 'Console.Write((char)3) 'this also prints the same Console.ReadKey() End Sub End Module |
Output :
Explanation : Actually here we are printing the ASCII smbol of 3 . Which gives a love symbol.
you can also print directly by writing the following code.
Console.Write(Convert.ToChar(3)) or Console.Write(ChrW(3))