随笔分类 -  C#

摘要:找到项目下的.vs目录中的applicationhost.config文件,增加一行配置,重启vs运行 阅读全文
posted @ 2024-09-14 10:52 最好的年纪 阅读(57) 评论(0) 推荐(0)
摘要:DirectoryInfo zipDir = new DirectoryInfo(zipDirPath); zipDir.Delete(true); 阅读全文
posted @ 2022-06-29 19:31 最好的年纪 阅读(388) 评论(0) 推荐(0)
摘要:ddcsList = LoadEntities(x => x.Status == 1).GroupBy(t => t.SelectKey).Select(o => o.FirstOrDefault()).ToList(); 阅读全文
posted @ 2021-11-22 09:40 最好的年纪 阅读(717) 评论(0) 推荐(0)
摘要:/// <summary> /// 创建人名 /// </summary> [NotMapped] public string CreateUserName { get; set; } /// <summary> /// 创建时间 /// </summary> [NotMapped] public 阅读全文
posted @ 2021-10-26 15:35 最好的年纪 阅读(272) 评论(0) 推荐(0)
摘要:string str1 = Process.GetCurrentProcess().MainModule.FileName;//可获得当前执行的exe的文件名。 string str2 = Environment.CurrentDirectory;//获取和设置当前目录(即该进程从中启动的目录)的完 阅读全文
posted @ 2021-10-20 15:33 最好的年纪 阅读(3828) 评论(0) 推荐(2)
摘要:参考链接:Object to Generic List<> cast (microsoft.com) IList objList = (IList)objData; int count = objList.Count; // The LINQ conversions will lose this i 阅读全文
posted @ 2021-10-20 11:36 最好的年纪 阅读(5015) 评论(0) 推荐(0)
摘要:参考文章地址:itextsharp和图像大小 - 码客 (oomake.com) 国内提问文章:itextsharp和图像大小 - 码客 (oomake.com) 国外参考文章:scaling images in iTextSharp 如果想要完全相同的尺寸,那么应该使用ScaleAbsolute而 阅读全文
posted @ 2021-08-05 10:41 最好的年纪 阅读(3321) 评论(0) 推荐(1)
摘要:dynamic obj = { HostFileIds : ["xxxx","yyyy"]}; List<string> hostFileIds = JsonHelper.DeserializeJsonToList<string>(Convert.ToString(obj.HostFileIds)) 阅读全文
posted @ 2021-08-03 15:58 最好的年纪 阅读(249) 评论(0) 推荐(0)
摘要:public class EnumHelper { /// <summary> /// 将枚举转为集合 /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> public static List<Enu 阅读全文
posted @ 2020-10-12 20:02 最好的年纪
摘要:(浏览器端) JS代码: // 建立ServerSentEvents(服务器向浏览器推送信息,简称SSE) $(function () { if (typeof (EventSource) !== "undefined") { // 展示服务器推送内容的DOM var container = doc 阅读全文
posted @ 2020-09-27 18:45 最好的年纪 阅读(1023) 评论(0) 推荐(0)
摘要:参考原文地址:https://blog.csdn.net/zt102545/article/details/85396360 在原文基础上,需要以下两点注意事项 注意事项: 1.服务端控制器需要添加路由 2. web.config配置文件需要添加配置 <system.web> <httpRuntim 阅读全文
posted @ 2020-08-03 13:30 最好的年纪 阅读(847) 评论(0) 推荐(0)
摘要:示例的匿名对象格式如下,目的是想要得到result.result的值: customObj<Anonymous Type> = { msg: "", result:<Anonymous Type> } string rs = customObj.GetType().GetProperty("resu 阅读全文
posted @ 2020-04-24 10:45 最好的年纪 阅读(1050) 评论(0) 推荐(0)
摘要:前端创建的的对象例如: C#端这样将数组提取出来存入 阅读全文
posted @ 2019-09-20 17:41 最好的年纪 阅读(1871) 评论(0) 推荐(0)
摘要:以上内容转自 https://blog.csdn.net/lj102800/article/details/6106451 阅读全文
posted @ 2019-01-25 09:25 最好的年纪 阅读(3978) 评论(0) 推荐(1)