随笔分类 -  C#

摘要:为某些类型添加扩展方法,比如C#的数组原先没有Join 把数组拼接成字符串,具体请参考JS的join。 下面代码为 IEnumerable<T>添加 Join, 为Object添加Keys public static class Extends { /// <summary> /// 把值类型的数组 阅读全文
posted @ 2023-07-09 16:56 EhuanRum 阅读(48) 评论(0) 推荐(0)
摘要:自定义自己的特性方法 MyCustom [AttributeUsage(AttributeTargets.Class | AttributeTargets.Field | AttributeTargets.Method, Inherited = true, AllowMultiple = true) 阅读全文
posted @ 2023-07-09 16:48 EhuanRum 阅读(16) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace 阅读全文
posted @ 2023-07-09 16:41 EhuanRum 阅读(340) 评论(0) 推荐(0)