CompilationSection.UrlLinePragmas 属性

定义

获取或设置一个值,该值指示编译器指令使用物理路径还是 URL。

public:
 property bool UrlLinePragmas { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("urlLinePragmas", DefaultValue=false)]
public bool UrlLinePragmas { get; set; }
[<System.Configuration.ConfigurationProperty("urlLinePragmas", DefaultValue=false)>]
member this.UrlLinePragmas : bool with get, set
Public Property UrlLinePragmas As Boolean

属性值

Boolean

如果编译器指令使用 URL 而不是物理路径,则为 true;否则为 false。 默认值为 false

属性

示例

下面的代码示例演示如何使用该 UrlLinePragmas 属性。 此代码示例是为类提供的大型示例的 CompilationSection 一部分。

// Display UrlLinePragmas property.
Console.WriteLine("UrlLinePragmas: {0}", 
  configSection.UrlLinePragmas);

// Set UrlLinePragmas property.
configSection.UrlLinePragmas = false;
' Display UrlLinePragmas property.
Console.WriteLine("UrlLinePragmas: {0}", _
 configSection.UrlLinePragmas)

' Set UrlLinePragmas property.
configSection.UrlLinePragmas = False

注解

如果在配置中指定 true 此属性,则 URL 将用于编译器指令,而不是物理路径。

适用于