分类: C#

4 篇文章

DotNet(6) Core WebAPI部署到Linux并配置Nginx反向代理
DotNet Core WebAPI部署到Linux并配置Nginx反向代理 创建WebApi模板并发布 添加中间件 //app.UseHttpsRedirection();//停用https重定向 using Microsoft.AspNetCore.HttpOverrides; app.UseForwardedHeaders(new Forwa…
C# 面向对象
对象是一组属性和方法(事件)的组合 class program { void main(string[] args) { //没有类的话 string userName = "Tim";//定义一个字符串变量 int userAge = 18;//定义一个32位无符号整数变量 Console.WriteLine("Name:{0},Age{1}",…
c#文件路径属性获取拆分/编码格式/换行符
路径、文件名、扩展名 //现有一个文件路径为:  localFilePath=”C:\Users\user\Desktop\表格001.xlsx“ //获取文件路径 string directory = Path.GetDirectoryName(localFilePath); //C:\Users\user\Desktop //获取文件名 str…
C#线程操作方法-备忘
//引用命名空间 using System.Threading; //实例化一个新线程 static void ThreadMethod(){} Thread th = new Thread(ThreadMethod); //设置为后台线程 th.isBackGround = true; //启动线程 th.Start(); //挂起线程 th.S…