C
Christoffer Soerensen
Hi,
I am currently building an application in C# using mono and .NET. I
want to get a MIME type for a specific file, which is why I want to
detect the OS on which the application is running. On Windows, I would
look up the registry, on Linux/OSX/etc. I would look in
/etc/mime-types (or where the mime types are located). How would I
detect the OS ?
I have tried the following:
OperatingSystem os = Environment.OSVersion;
Version vs = os.Version;
This gives me: "5.1.2600" on Linux
Maybe it is better to build a MIME database on my own instead of
relying on the OS ?
Regards,
Christoffer
I am currently building an application in C# using mono and .NET. I
want to get a MIME type for a specific file, which is why I want to
detect the OS on which the application is running. On Windows, I would
look up the registry, on Linux/OSX/etc. I would look in
/etc/mime-types (or where the mime types are located). How would I
detect the OS ?
I have tried the following:
OperatingSystem os = Environment.OSVersion;
Version vs = os.Version;
This gives me: "5.1.2600" on Linux

Maybe it is better to build a MIME database on my own instead of
relying on the OS ?
Regards,
Christoffer