env error c# code example
Example 1: csharp check if env is development
bool isDevelopment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == "Development";
Example 2: .net using system variables
public static string? GetEnvironmentVariable (string variable);