VB.NET中的哈希符号(#)

pln*_*txt 2 vb.net

我有这个我正在使用的遗留代码,并且这里有代码如下:

    #If PRE611 = True Then
        'Do Something
    #Else
        'Something Else
    #End If

我很确定PRE611与版本控制有关,但我想知道#符号的具体用途.

dr.*_*vil 9

这些是指令,允许您进行条件编译.#符号用于指令.

在这种情况下,它将根据"PRE611 = True"的评估编译部分代码

您可以在以下示例中看到这篇文章:http: //visualbasic.about.com/od/usingvbnet/a/vbdirectives01_2.htm