NET Core中使用读取配置文件
引入Nuget的两个类库Microsoft.Extensions.ConfigurationMicrosoft.Extensions.Configuration.Json使用varbuilder=newConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json");varconfigurationRoot=builder.Build();varmotherNameSection=configurationRoot.GetSection(&quo
用户评论