摘要:
this.listView.Items.Add(lvi); this.listView.EnsureVisible(this.listView.Items.Count - 1); this.listView.Items[this.listView.Items.Count - 1].Checked = true; 阅读全文
摘要:
自动属性默认初始化 public string Name { get; set; } = "hello world"; Null条件运算符 Customer customer = new Customer(); string name3 = customer?.Name; 字符串格式化 var s = $"{p.Name} is {p.Age} year{(p.Age == 1 ? "" ... 阅读全文
摘要:
public class XmlHelper { public XmlHelper() { } public enum XmlType { File, String }; /// /// 创建XML文档 ... 阅读全文
摘要:
/// /// Config文件操作 /// public class Config { /// /// 根据Key取Value值 /// /// public static string GetValue(string key) { ... 阅读全文
摘要:
public static class JsonHelper { public static String ToJson(object obj) { return JsonConvert.SerializeObject(obj); } public static T ToObject(string json) { retu... 阅读全文
摘要:
JS加载获取父窗体传递的参数 $(document).ready(function () { var query = location.search.substring(1); var values = query.split("&"); for (var i = 0; i 0) { ... 阅读全文
摘要:
Dictionary dic = new Dictionary(); dic.Add("1", "1"); for (int index = 0; index < dic.Count; index++) { var item = dic.ElementAt(index); ... 阅读全文
摘要:
using System.Collections.Generic; using System.Linq; namespace System { /// /// 表示应用程序在执行后的结果。 /// public class ApplicationResult { static readonly ApplicationResult _s... 阅读全文
摘要:
using System; using System.Collections; using System.Collections.Generic; using System.Threading; using System.Linq; [System.Diagnostics.CodeAnalysis.SuppressMessage("Microso... 阅读全文
摘要:
public static class LinqExtension { public static T MaxBy(this IEnumerable en, Func evaluate) where TR : IComparable { return en.Select(t => new Tuple(t, evaluate(t))) .Aggregate((max, ne... 阅读全文