12 2015 档案
摘要:在c#中同样的方法名称不一样的参数数量和类型可以实现方法重载class ResultDisplayer{void DisplayResult(string result){// implementation}void DisplayResult(int result){// implementati...
阅读全文
摘要:实现下面效果的propertygrid属性下拉选择具体代码如下//form窗口类 public partial class Form1 : Form { public Form1() { InitializeComponent(); properties ps = new properties();...
阅读全文
摘要:枚举类型是用户自定义的整形,其定义形式如下public enum TimeOfDay{Morning = 0,Afternoon = 1,Evening = 2}枚举类型在实例化的时候其实是作为struct类型的获取该枚举类型string表示方式TimeOfDay time = TimeOfDay....
阅读全文
摘要:byte[] receivedBytes = new byte[1024000];IPHostEntry ipHost = Dns.Resolve(ipaddress); //ipaddress可以是string类型的ip地址,为服务器端的ip地址IPAddress ipAddress = ipHo...
阅读全文
摘要:提供了对数据访问的一种抽象层,是更加易于以编程的方式来操作及管理数据有以下几种模式:Model First, Database First, and Code First现在主要讨论code First这种模式Conceptual Schema Defi nition Language (CSDL)...
阅读全文