摘要: 值类型和引用类型的基类引用类型和值类型都继承自System.Object类。不同的是,几乎所有的引用类型都直接从System.Object继承,而值类型则继承其子类,即直接继承System.ValueType。作为所有类型的基类,System.Object提供了一组方法,这些方法在所有类型中都能找到 阅读全文
posted @ 2017-06-14 10:48 小程序员// 阅读(327) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace 函数及 阅读全文
posted @ 2017-06-13 17:04 小程序员// 阅读(102) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace Con 阅读全文
posted @ 2017-06-12 21:11 小程序员// 阅读(132) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace Con 阅读全文
posted @ 2017-06-12 21:10 小程序员// 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 普通集合和泛型集合的区别: 泛型集合与传统集合相比 类型更安全. 泛型集合无需装箱拆箱操作. 泛型的重要性. 泛型是未来五年的主流技术 ...通常情况下,建议您使用泛型集合,因为这样可以获得类型安全的直接优点而不需要从基集合类型派生并实现类型特定的成员。此外,如果集合元素为值类型,泛型集合类型的性能 阅读全文
posted @ 2017-06-12 21:10 小程序员// 阅读(2337) 评论(0) 推荐(0) 编辑
摘要: C#时间/日期格式大全 C#时间/日期格式大全,C#时间/日期函数大全 有时候我们要对时间进行转换,达到不同的显示效果 默认格式为:2005-6-6 14:33:34 如果要换成成200506,06-2005,2005-6-6或更多的该怎么办呢? 我们要用到: DateTime.ToString的方 阅读全文
posted @ 2017-06-10 16:25 小程序员// 阅读(205) 评论(0) 推荐(0) 编辑
摘要: [csharp] view plain copy [csharp] view plain copy 阅读全文
posted @ 2017-06-10 16:20 小程序员// 阅读(163) 评论(0) 推荐(0) 编辑
摘要: [javascript] view plain copy [javascript] view plain copy 阅读全文
posted @ 2017-06-10 16:19 小程序员// 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 今天做了几个题、,练习一下: 计算输入的时间是当前这一年的第几天 Console.Write("请输入年份"); int nf1 = int.Parse(Console.ReadLine()); Console.Write("请输入月份"); int yf1 = int.Parse(Console. 阅读全文
posted @ 2017-06-09 17:21 小程序员// 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 一、C#中的变量和常量 C#中用于定义常量的方式有两种一个使用const关键字,一个是用readonly关键字。使用const定义的常量叫静态常量(compile-time constant),用readonly定义的常量叫动态常量(runtime constant)。常量定义 public con 阅读全文
posted @ 2017-06-09 17:12 小程序员// 阅读(200) 评论(0) 推荐(0) 编辑