Rather, is there a way to tell if it's been compiled with the optimization parameter enabled or disabled. I don't want to know if it's release or debug, since either can be enabled with or without optimizations. From my perspective, even though the code says it's release version, is it truly optimized? Thanks.
To troubleshoot the issue, check the condenser and clean away any debris. This area can be cleaned by a vacuum with a brush attachment, or try using a hose to gently wipe away any dirt and grime. Still dealing with AC running but not cooling? If so, it may be time to call a professional for service.
I'm 8 years late but if you, like me, wanted a C# way, here it is:
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
internal static class AssemblyExtensions
{
public static bool IsOptimized(this Assembly asm)
{
var att = asm.GetCustomAttribute<DebuggableAttribute>();
return att == null || att.IsJITOptimizerDisabled == false;
}
}
As an extension method:
static void Main(string[] args)
{
Console.WriteLine("Is optmized: " + typeof(Program).Assembly.IsOptimized());
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With