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>();