共用方式為


HostingEnvironmentExtensions.IsDevelopment(IHostingEnvironment) 方法

定義

檢查目前的主控環境名稱是否為 Development

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsDevelopment(Microsoft::AspNetCore::Hosting::IHostingEnvironment ^ hostingEnvironment);
public static bool IsDevelopment (this Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment);
static member IsDevelopment : Microsoft.AspNetCore.Hosting.IHostingEnvironment -> bool
<Extension()>
Public Function IsDevelopment (hostingEnvironment As IHostingEnvironment) As Boolean

參數

hostingEnvironment
IHostingEnvironment

IHostingEnvironment 的執行個體。

傳回

如果環境名稱為 ,則為 True,否則為 Development false。

適用於