VB.Net Program to Demonstrate the Val() Function

You are currently viewing VB.Net Program to Demonstrate the Val() Function

VB.Net program to demonstrate the Val() function

'VB.Net program to demonstrate the Val() function.
Module Module1
    Sub Main()
        Dim result As Integer = 0

        Dim n1 As String = "111"
        Dim n2 As String = "222"
        Dim n3 As String = "333"

        result = Val(n1)
        Console.WriteLine("Integer value: {0}", result)

        result = Val(n2)
        Console.WriteLine("Integer value: {0}", result)

        result = Val(n3)
        Console.WriteLine("Integer value: {0}", result)

    End Sub
End Module

Output

Integer value: 111
Integer value: 222
Integer value: 333
Press any key to continue . . .

Ranjith Kumar

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply