#Const : Pre Compile « Development « VB.Net Tutorial
- VB.Net Tutorial
- Development
- Pre Compile
public class Test
public Shared Sub Main
#If UseFastAlgorithm Then
Console.WriteLine("Fast")
#Else
Console.WriteLine("Slow")
#End If
#Const UseFastAlgorithm = True
#If UseFastAlgorithm Then
Console.WriteLine("Fast")
#Else
Console.WriteLine("Slow")
#End If
End Sub
End class
Slow
Fast