Mega Code Archive

 
Categories / VB.Net Tutorial / Class Module
 

Use function in If statement

Module Module1     Function GetBookPrice() As Double         GetBookPrice = 49.99     End Function     Function GetBookTitle() As String         GetBookTitle = "Title"     End Function     Sub Main()         If (GetBookPrice() = 49.99) Then             Console.WriteLine("The book is 49.99")         End If     End Sub End Module The book is 49.99