- 博客(10)
- 资源 (1)
- 收藏
- 关注
原创 C# mvc图片上传下载
//图片上传,没有判断图片大小和格式 public ActionResult UploadAppIcon() { try { var file = Request.Files[0]; var iconFile = IconFilePath(); ...
2019-04-01 16:42:07 1137
原创 C# 秒数转换时分秒
/// <summary> /// 秒数转换 /// </summary> /// <param name="second"></param> /// <returns></returns> public static stri...
2019-04-01 16:36:18 1432
原创 基础连接已经关闭: 发送时发生错误
在WebRequest.Create前面加上以下内容,注释的可以不加。 ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; //ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; //Servi...
2019-12-13 10:55:47 1616
原创 WinForm项目打包
一个http请求的小工具,需要打包成安装程序,所以记录了一下WinForm的项目打包。 小工具下载,包含项目的打包:https://download.csdn.net/download/beishuoh/11446910 1.解决右键:添加新建项目,选择其他项目类型,选择第一个项目。 若没有该选项,则在工具->扩展和更新 联机搜索Visual Studio Installer Pr...
2019-07-29 16:06:44 430
原创 C# 写入和读取text文件
//验证文件夹是否存在 public string DirFilePath() { //文件上传后的保存路径 //获取项目文件路径可参考 : https://blog.csdn.net/oshan2012/article/details/91821229 string file...
2019-07-26 17:59:42 1286
原创 c# 时间戳
//合并日期 如:20190622 var timestamp = DateTime.Now.ToString("yyyyMMdd"); //日期转换为时间戳 public static long ConvertDateTimeToTimestamp(DateTime time) { ...
2019-07-25 16:13:39 221
转载 SecureCRT工具登陆跳板机进行连接服务器
转载 https://www.cnblogs.com/josephcnblog/articles/7446464.html https://blog.csdn.net/qq_27575895/article/details/86589654#commentsedit https://blog.csdn.net/tterminator/article/details/53824033 ...
2019-07-23 17:51:50 469
原创 c# npol读取excel
npol读取excel 添加引用 找到项目的Nuget包 添加npol的引用(开始以为npol的dll必须要从别的地方单独下载才可以,后来直接从vs里面的Nuget包引用也是可以的) 下面是读取excel方法:第一眼一看感觉方法有点长,只是多加了几个判断,而且npol的好像都是很长 /// <summary> ///...
2019-07-19 18:42:00 521
原创 Asp.net使用Swagger生成API在线文档
引用Swagger的Nuget包 引用成功后在项目中生成一个SwaggerConfig.cs文件 设置Swagger输出的文档路径 测试方法 public class ApiTestController : ApiController { static List<User> _users = new List<User>() { ...
2019-02-26 17:23:11 411
http请求 项目打包
2019-07-30
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人