随笔分类 -  C#

摘要:c#代码: 点击查看代码 var xmlData = new XDocument(new XElement("Data", query.weldPlanList.Select(r => new XElement("Row", new XAttribute("APSFactoryID", query. 阅读全文
posted @ 2024-04-16 12:57 乌卡拉卡 阅读(65) 评论(0) 推荐(0)
摘要:List SubPeopleNameList2 = PeopleList.Where(people => people.Name == "Haocheng Wu" && people.Age == 24).Select(people => people.Name).ToList(); 阅读全文
posted @ 2023-03-31 17:09 乌卡拉卡 阅读(70) 评论(0) 推荐(0)
摘要:点击查看代码 /// <summary> /// C# List转换成DataTable /// </summary> /// <param name="list"></param> /// <returns></returns> public static DataTable ListToData 阅读全文
posted @ 2023-03-31 17:07 乌卡拉卡 阅读(27) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/a164266729/p/4913898.html 在面试的过程中提到了异常捕获的的几种用法,之前一直使用但是没有仔细留意,调试程序的过程中发现还是有区别的,主要区别在堆栈信息的起始点不同,下边我们通过实例来看这集中不同的抛出异常的方法。 一般我们推荐 阅读全文
posted @ 2022-02-25 16:58 乌卡拉卡 阅读(184) 评论(0) 推荐(0)
摘要:转自:https://www.cnblogs.com/GreenLeaves/p/6843026.html 简介:ref和out是C#开发中经常使用的关键字,所以作为一个.NET开发,必须知道如何使用这两个关键字. 1、相同点 ref和out都是按地址传递,使用后都将改变原来参数的数值。 2、ref 阅读全文
posted @ 2020-10-17 09:11 乌卡拉卡 阅读(328) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/freeliver54/p/10512031.html 阅读全文
posted @ 2020-09-21 10:53 乌卡拉卡 阅读(291) 评论(0) 推荐(0)
摘要:https://docs.microsoft.com/zh-cn/dotnet/api/system.io.file?view=netframework-4.7.2 阅读全文
posted @ 2020-09-14 10:31 乌卡拉卡 阅读(136) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/SavionZhang/p/11422481.html 阅读全文
posted @ 2020-07-15 13:16 乌卡拉卡 阅读(133) 评论(0) 推荐(0)
摘要:反射用于在程序运行过程中,获取类里面的信息或发现程序集并运行的一个过程。通过反射可以获得.dll和.exe后缀的程序集里面的信息。使用反射可以看到一个程序集内部的类,接口,字段,属性,方法,特性等信息。 一、各种GetType()、typeof的区别 首先就是获取Tyoe对象的来源不同: 复制代码 阅读全文
posted @ 2020-06-29 15:32 乌卡拉卡 阅读(123) 评论(0) 推荐(0)