Per Jason Shirk If runtime checks are desired, please use something like private static readonly bool _isLinux = System.IO.Path.DirectorySeparatorChar == ' '; And then return this bool in the IsLinux method. I have verified that RyuJIT generates much better code this way, it can actually inline everything whereas it doesn't as written. VSO create date - 9/8/2015 11:50:00 VSO closed date - 9/8/2015 18:53:00
Per Jason Shirk If runtime checks are desired, please use something like private static readonly bool _isLinux = System.IO.Path.DirectorySeparatorChar == ' '; And then return this bool in the IsLinux method. I have verified that RyuJIT generates much better code this way, it can actually inline everything whereas it doesn't as written. VSO create date - 9/8/2015 11:50:00 VSO closed date - 9/8/2015 18:53:00