Mega Code Archive

 
Categories / VB.Net Tutorial / Statements
 

Microsoft VisualBasic Switch

Module Module1     Sub Main()         Dim intValue As Integer = -10         Console.WriteLine("Absolute value: " & _             Microsoft.VisualBasic.Switch(intValue < 0, -1 * intValue, intValue >= 0, intValue))     End Sub End Module Absolute value: 10