1. 添加Nuget包
安裝 Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation 包
2. 配置服務
stratup的ConfigureServices中添加services.AddRazorPages().AddRazorRuntimeCompilation(); //添加運行時編譯功能
安裝 Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation 包
stratup的ConfigureServices中添加services.AddRazorPages().AddRazorRuntimeCompilation(); //添加運行時編譯功能
using System; using System.Runtime.InteropServices; using System.Windows.Fo
static void Screen() { List<int> newList=new List<int>(); List<int> list =new List<int>();