Program.cs 999 B

1234567891011121314151617181920212223242526272829303132333435
  1. using Masuit.Tools.Core.Database;
  2. using Masuit.Tools.Hardware;
  3. using Microsoft.AspNetCore;
  4. using Microsoft.AspNetCore.Hosting;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.ComponentModel;
  8. using System.Linq;
  9. namespace NetCoreTest
  10. {
  11. public class Program
  12. {
  13. public static void Main(string[] args)
  14. {
  15. var table = new List<MyClass>() { new MyClass() { MyProperty = "sss", MyProperty1 = 222 } }.Select(c => new { 列1 = c.MyProperty, 列2 = c.MyProperty1 }).ToDataTable();
  16. Console.WriteLine((long)SystemInfo.GetRamInfo().MemoryAvailable);
  17. CreateWebHostBuilder(args).Build().Run();
  18. }
  19. public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
  20. WebHost.CreateDefaultBuilder(args)
  21. .UseStartup<Startup>();
  22. }
  23. public class MyClass
  24. {
  25. [Description("test")]
  26. public string MyProperty { get; set; }
  27. public int MyProperty1 { get; set; }
  28. }
  29. }