April 2008
Intermediate to advanced
704 pages
17h 49m
English
Problem
You need to selectively include and exclude sections of source code from your compiled assembly.
Solution
Use the #If, #ElseIf, #Else, and #End If preprocessor directives to identify blocks of code that should be conditionally included in your compiled assembly. Use the System.Diagnostics.ConditionalAttribute attribute to define methods that should be called conditionally only. Control the inclusion of the conditional code using the #Const directive in your code, or use the /define switch when you run the VB .NET compiler from the command line.
How It Works
If you need your application to function differently depending on factors such as the platform or environment on which it runs, you can ...
Read now
Unlock full access