摘要:public static class DataTableHelper2 { public static List<T> DataTableToList<T>(this DataTable dataTable) where T : new() { var dataList = new List<T>
阅读全文
随笔分类 - C#2.0
摘要:public class Rootobject { public string from { get; set; } public string to { get; set; } public string domain { get; set; } public int type { get; se
阅读全文
摘要:上传到FTP Server Controller [HttpPost] public ActionResult Upload(HttpPostedFileBase[] files) { //廠別,部門,單號,單據類型,文件名,保存文件名,Seq,上傳人員,上傳時間 Enabled //1.保存文件,
阅读全文
摘要:C# /// <summary> /// Model to Model /// </summary> /// <typeparam name="T">类</typeparam> /// <typeparam name="Tn">新的类</typeparam> /// <param name="obj
阅读全文
摘要:1.支付宝支付配置文件设置教程:https://helei112g.github.io/2017/03/09/Payment%EF%BC%9A%E6%94%AF%E4%BB%98%E5%AE%9D%E6%94%AF%E4%BB%98%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%
阅读全文
摘要:大家在做报表或查询的时候都会有给用户预设一些可选的日期范围//如本年度销售额、本季度利润、本月新增客户//C#里内置的DateTime基本上都可以实现这些功能,巧用DateTime会使你处理这些事来变轻松多了//今天DateTime.Now.Date.ToShortDateString();//昨天,就是今天的日期减一DateTime.Now.AddDays(-1).ToShortDateString();//明天,同理,加一DateTime.Now.AddDays(1).ToShortDateString();//本周(要知道本周的第一天就得先知道今天是星期几,从而得知本周的第一天就是几天前
阅读全文
摘要:一、抽象类: 抽象类是特殊的类,只是不能被实例化;除此以外,具有类的其他特性;重要的是抽象类可以包括抽象方法,这是普通类所不能的。抽象方法只能声明于抽象类中,且不包含任何实现,派生类必须覆盖它们。另外,抽象类可以派生自一个抽象类,可以覆盖基类的抽象方法也可以不覆盖,如果不覆盖,则其派生类必须覆盖它们。 二、接口: 接口是引用类型的,类似于类,和抽象类的相似之处有三点:1、不能实例化; 2、包含未实...
阅读全文
摘要:from:http://blog.csdn.net/myjava_024/archive/2008/11/04/3220319.aspx 学习了这么多的排序算法,还没有做个总结,呵呵 冒泡排序 冒泡排序是最慢的排序算法。在实际运用中它是效率最低的算法。它通过一趟又一趟地比较数组中的每一个元素,使较大的数据下沉,较小的数据上升。它是O(n^2)的算法。 快速排序 快速排序是一个就地排序,分而治之,大...
阅读全文
摘要:ReSharper 4.5 快捷方式详细介绍http://www.jetbrains.com/resharper/documentation/feature_map.html
阅读全文
摘要:1. C# WinForm 在窗口菜单上显示已打开窗体的标题 设置窗体菜单的MdiList属性为 True2.窗体的排列[代码]
阅读全文
摘要:Products Version Size Requirement Download ASP2ASPX 4.5 666KB .NET 1.1 or Higher Download » Delphi2CS 3.2 590KB .NET 1.1 or Higher Download » PB2CS 1.0 317KB .NET 1.1 or Higher Download ...
阅读全文
摘要:usingMicrosoft.Win32; Creating SubKeys in the registryWe create a subkey by using the CreateSubKey method. We usually want to create a subkey in HKEY_CURRENT_USER/SOFTWARE that is why we use the follo...
阅读全文
摘要:在C#程序中使用系统热键 1.首先引入System.Runtime.InteropServicesusing System.Runtime.InteropServices;2.在类内部声明两个API函数,它们的位置和类的成员变量等同.[System.Runtime.InteropServices.DllImport("user32.dll")] //申明API函数public static ext...
阅读全文
摘要:The WebBrowser control is just an embeddded IE Control, I believe any settings in IE, like the proxy settings, are honered just the same as they are in IE. You can change the proxy with InternetSet...
阅读全文
摘要:一 功能需求 1.自动随机点击数据库中网页地址,可设定时间间隔。 2.可按指定时间段内的随机时间点击网页。(暂为实现) 3.可设定完成后自动退出程序。 4.可设置代理。 5.加入热键显示和隐藏功能。 6.按规则抓取网页中的链接。 7.定时点击网页中的按钮。 二 目前实现情况 1.自动点击数据库中的网页,指定时间间隔可设置代理,加入热键...
阅读全文
摘要:1. string 与 char 数组互转 ToCharArray(); new String(CharArray) string 转换成 Char[] string ss="abcdefg"; char[] cc=s.ToCharArray(); Char[] 转换成string string...
阅读全文
摘要:DateTime.Now.ToString("dd-MMM-yyyy")想得到英文的月份,如:05-Mar-2008,可是这样s转化完总是得到"05-三月-2008",我应该在哪里设置呢? System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
阅读全文
摘要:interface & abstract class 为什么不能包含static 方法! abstract class A { static void doSomething() ; } 不能通过编译是因为你没有定义doSomething 的方法体,比如该语句最后你加上{},就可以了用了.这时候doSomething 是A的一个类方法. 如果你想把它定义为一个抽象方法那么你必须定义它的时...
阅读全文