摘要:环境:vs2010 sp1,mvc4,WIN10 生成安装项目后进行安装提示: 此安装程序需要Internet Information Server 5.1或更高版本和Windows XP和更高的安装时在Windows Server 2008的安装项目和IIS 7 解决办法:1,点击安装项目,启动条
阅读全文
随笔分类 - C#学习区
摘要:1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; ...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 /**//// 2 /// 检验日期格式是否正确 3 /// 4 public string IsDateFormat(string s...
阅读全文
摘要: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注释掉的话,就成...
阅读全文
摘要:11)装箱与拆箱:值类型与引用类型之间的转换. using System;class App{ public static void Main() { long i = 100; //这个是值类型,i是具体的有自己内存的变量 //x是object类型的引用,它是一个引用类型,这里将数值类型i的值给了x指向的对象内存,即装箱,是隐式的. /...
阅读全文
摘要:1)从"Hello,world!"开始 using System; //声明引用的名称空间class Program //C#的Main方法必须在一个类之中{ static void Main(string[] args) //Main必须是一个静态的方法,它是默认的入口点 { //这里的Console是System命名空间下的类,它表示了控制台类 ...
阅读全文

浙公网安备 33010602011771号