摘要: string name=""; string address=""; string company=""; if (!string.IsNullOrEmpty(name)&& !string.IsNullOrEmpty(address)&& !string.IsNullOrEmpty(company) ) { } 阅读全文
posted @ 2013-05-22 21:10 Predator 阅读(93) 评论(0) 推荐(0) 编辑
摘要: bool isVisible; string visible = "false"; if (bool.TryParse(visible,out isVisible)) { Console.WriteLine(isVisible); } else { Console.WriteLine("failure"); } 阅读全文
posted @ 2013-05-22 21:09 Predator 阅读(116) 评论(0) 推荐(0) 编辑
摘要: using System.Collections;namespace ConTest{ class DataSeries { private Hashtable ownerDatas; public double[] Datas { get; set; } public double[]this[string name] { get { if (ownerDatas==null) { ownerDatas = new Hashtable(); } return (double[])ownerDatas[name]; } set { if (ownerDatas==null) { ownerD. 阅读全文
posted @ 2013-05-22 21:08 Predator 阅读(175) 评论(0) 推荐(0) 编辑
摘要: namespace ConTest{ class DataSeries { public double[] Datas { get; set; } public DataSeries(int len) { this.Datas = new double[len]; } public DataSeries() { this.Datas = new double[0] { }; } }} 阅读全文
posted @ 2013-05-22 21:07 Predator 阅读(157) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConTest{ class Teacher { private Dictionary<string, Student> students = new Dictionary<string, Student>(); public Student this[string name] { get { return students[name]; } set { students[name] = 阅读全文
posted @ 2013-05-22 21:06 Predator 阅读(240) 评论(0) 推荐(0) 编辑