fork download
  1. using System;
  2. using System.Runtime.InteropServices;
  3.  
  4. class Program{
  5. static void Main(){
  6. // プラットフォームID
  7. Console.WriteLine(Environment.OSVersion.Platform);
  8. // OSバージョン
  9. Console.WriteLine(Environment.OSVersion.Version);
  10. // OS名+バージョン
  11. Console.WriteLine(Environment.OSVersion.VersionString);
  12. // OSアーキテクチャ
  13. Console.WriteLine(RuntimeInformation.OSArchitecture);
  14.  
  15. // .NETバージョン
  16. Console.WriteLine(RuntimeInformation.FrameworkDescription);
  17. // 実行プロセスのアーキテクチャ
  18. Console.WriteLine(RuntimeInformation.ProcessArchitecture);
  19. }
  20. }
  21.  
Success #stdin #stdout 0.03s 25168KB
stdin
Standard input is empty
stdout
Unix
4.19.0.14
Unix 4.19.0.14
X64
Mono 5.20.1.19 (tarball Thu Apr 11 09:02:17 UTC 2019)
X64