VB.net Program to Check String Contains a Number or Not

You are currently viewing VB.net Program to Check String Contains a Number or Not

VB.Net program to check string contains a number or not

'Vb.Net program to check a string contains a number or not.

Module Module1
    Sub Main()
        Dim num As String = "123"
        Dim ret As Boolean

        ret = IsNumeric(num)

        If (ret = True) Then
            Console.WriteLine("Specified string contains a number")
        Else
            Console.WriteLine("Specified string does not contain a number")
        End If
    End Sub
End Module
Specified string contains a number
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