delphi&.net学习记事本

  博客园 :: 首页 :: 新随笔 :: :: :: 管理 ::

随笔分类 -  C#学习区

摘要:环境:vs2010 sp1,mvc4,WIN10 生成安装项目后进行安装提示: 此安装程序需要Internet Information Server 5.1或更高版本和Windows XP和更高的安装时在Windows Server 2008的安装项目和IIS 7 解决办法:1,点击安装项目,启动条 阅读全文
posted @ 2016-07-23 09:26 骑人的驴 阅读(2781) 评论(0) 推荐(0)

摘要:1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; ... 阅读全文
posted @ 2006-12-08 14:18 骑人的驴 阅读(348) 评论(0) 推荐(0)

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 /**//// 2 /// 检验日期格式是否正确 3 /// 4 public string IsDateFormat(string s... 阅读全文
posted @ 2006-12-08 14:12 骑人的驴 阅读(546) 评论(0) 推荐(0)

摘要:21)类的属性,又称智能字段 using System;class A{ private int x; public int y; private string s; public int X { //get { return this.x; } //被读 set { this.x = value; } //被写(将get注释掉的话,就成... 阅读全文
posted @ 2006-11-16 11:24 骑人的驴 阅读(487) 评论(0) 推荐(0)

摘要:11)装箱与拆箱:值类型与引用类型之间的转换. using System;class App{ public static void Main() { long i = 100; //这个是值类型,i是具体的有自己内存的变量 //x是object类型的引用,它是一个引用类型,这里将数值类型i的值给了x指向的对象内存,即装箱,是隐式的. /... 阅读全文
posted @ 2006-11-16 11:20 骑人的驴 阅读(371) 评论(0) 推荐(0)

摘要:1)从"Hello,world!"开始 using System; //声明引用的名称空间class Program //C#的Main方法必须在一个类之中{ static void Main(string[] args) //Main必须是一个静态的方法,它是默认的入口点 { //这里的Console是System命名空间下的类,它表示了控制台类 ... 阅读全文
posted @ 2006-11-16 11:14 骑人的驴 阅读(444) 评论(0) 推荐(0)