所谓的潇洒

导航

2020年8月31日 #

多个控件共用右键菜单

摘要: 多个控件共用右键菜单,可以实现菜单事件代码共用,那么问题来了,当事件触发后怎么知道是哪个控件触发的呢? 方法: private void menu_Rename_Click(object sender, EventArgs e) { try { var pBox = (PictureBox)((Co 阅读全文

posted @ 2020-08-31 14:16 所谓的潇洒 阅读(284) 评论(0) 推荐(0) 编辑

反射语法

摘要: 假设有如下类,及其对象a: public class A { public string Name { get; set; } } 获取属性值语法: Type type = a.GetType(); var property = type.GetProperty("Name"); string va 阅读全文

posted @ 2020-08-31 12:01 所谓的潇洒 阅读(121) 评论(0) 推荐(0) 编辑

FTP连接数不够用

摘要: 当短时间内有很多(1K-2W)文件需要上传FTP时,异常日志如下: System.Net.WebException: The remote server returned an error: 227 Entering Passive Mode >System.Net.Sockets.SocketEx 阅读全文

posted @ 2020-08-31 11:23 所谓的潇洒 阅读(1817) 评论(0) 推荐(0) 编辑