随笔分类 - C/S
摘要:DataGridView 绑定 List 不会自动更新正确方式是将 List设置为 BindingList 即可 (双向绑定)
阅读全文
摘要:Step1:根据注册表获取系统默认的邮件客户端 运行地址 Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(@"mailto\shell\open\command");Step2:设置进程参数,启动应用程序 string path = key.GetValue("").ToString().Split('\"')[1]; System.Diagnostics.ProcessStartInfo pinfo = new
阅读全文
摘要:设置或获取窗体的对话框结果命名空间:System.Windows.Forms程序集:System.Windows.Forms(在 system.windows.forms.dll 中)namespace System.Windows.Forms{ // 摘要: // Specifies identifiers to indicate the return value of a dialog box. [ComVisible(true)] public enum DialogResult { // 摘要: // Nothi...
阅读全文
摘要:原理很简单,用反射获返回实体的属性的数组循环输出属性名和值,拼接Json格式字符串返回(转义掉'\','"'影响Json格式的字符)\ -> \\" -> \"using System.Reflection; /// <summary> /// /// </summary> /// <param name="obj">要转换的实体对象</param> /// <returns></returns> public string En
阅读全文
浙公网安备 33010602011771号