allencoded allencoded - 6 months ago 92
C# Question

System.Environment.OSVersion .NET Core 5.0 Framework replacement?

doesn't seem to be a part of .net core 5.0 (dnxcore50).

I am trying to determine which OS a user is on so when they save a file to the filesystem I know rather to use '/' or '\'

What should I use instead?

lkg lkg

Don't do the detection yourself. Use System.IO.Path.DirectorySeparatorChar. Also, if you always use Path to manipulate paths then you should get formatting that you need. This also works with URLs.