摘要:
string name=""; string address=""; string company=""; if (!string.IsNullOrEmpty(name)&& !string.IsNullOrEmpty(address)&& !string.IsNullOrEmpty(company) ) { } 阅读全文
摘要:
bool isVisible; string visible = "false"; if (bool.TryParse(visible,out isVisible)) { Console.WriteLine(isVisible); } else { Console.WriteLine("failure"); } 阅读全文
摘要:
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. 阅读全文
摘要:
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] { }; } }} 阅读全文
摘要:
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] = 阅读全文