Hi Kai,
Thanks for posting in the community.
First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you are confused about the if and
#if statement in VB.NET.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.
#If...Then...#Else Directives is used when conditionally compiles selected
blocks of Visual Basic code. The statement will be evaluated in compiling
time.
while If...Then...Else Statements is used when conditionally executes a
group of statements, depending on the value of an expression. It is
evalulated in run time.
#If...Then...#Else Directives
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/
vadirif.asp
If...Then...Else Statements
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/
vastmif.asp
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.