摘要:public class StringList { private int m_Capacity; private string[] m_Strings; private int m_Size; /// <summary> /// 数据个数属性 /// </summary> public int Count { get { return m_Size; } } /// <summary> /// 缓存大小属性 /// </summary> public int Capacity { get { return m_Capacity; } set {
阅读全文
摘要:复制:private void button1_Click(object sender, System.EventArgs e) { // Takes the selected text from a text box and puts it on the clipboard. if(textBox1.SelectedText != ”") Clipboard.SetDataObject(textBox1.SelectedText); }粘贴:private void button2_Click(object sender, System.EventArgs e) { // Decl
阅读全文
摘要:.c#中的foreach是类型下面的foreach(int i in arr){}2.c#中允许使用goto语句使用方法是 goto 标示符,其中标示符使用相应的标示符字母加上:3.c#中允许小范围的跳动,但是不允许跨函数或者说方法的跳转4.goto语句也可以在switch中使用5.throw语句是一种抛出语句。6.引用传递最终的结果,可能会改变传递的参数的值,值传递,不改变值7.out的关键字一般是为了让一个方法有多个返回值8.在一个项目中,声明的全局变量可以被涵盖在命名空间namespace中。而一个类当中的所谓的全局变量则必须用static关键字来修饰。9.常用方法9.1变量转字符串的方
阅读全文