随笔分类 - 代码片段C#
程序开发中常用的代码片段
摘要://获取当前进程的完整路径,包含文件名(进程名)。string str = this.GetType().Assembly.Location;result: X:\xxx\xxx\xxx.exe (.exe文件所在的目录+.exe文件名)//获取新的 Process 组件并将其与当前活动的进程关联的主模块的完整路径,包含文件名(进程名)。string str = System.Diagnostic...
阅读全文
摘要:1、设置DataGridView 的属性 SelectionModeSelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;2、设置事件CellMouseDownprivate void dgvResult_CellMouseDown(object sender, DataGridViewCellMo...
阅读全文
摘要:1 public class Person : BaseDomain 2 { 3 long _id; 4 string firstName; 5 string secondName; 6 string comments; 7 8 public Person() 9 {} 10 11 public P
阅读全文
摘要:public object BatchProcess(List<ChannelProductDTO> data_list) { int pageSize = 50; var batchPackage= new List<ChannelProductDTO>(pageSize); List<Chann
阅读全文
摘要:private void dataGridViewInventory_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { var dgv = sender as DataGridView; if(dgv != null) { ...
阅读全文

浙公网安备 33010602011771号