c#
cuijianzhongswust
这个作者很懒,什么都没留下…
展开
-
c# 创建dataGridView
1、实例化一个对象private System.Windows.Forms.DataGridView dataGridViewTable;2、把这个控件加入窗口this.Controls.Add(this.dataGridViewTable);3、设置一些属性 this.dataGridViewTable.Anchor = ((System.Win原创 2014-01-02 14:35:26 · 1226 阅读 · 0 评论 -
c# 枚举类型
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace test{ enum Gender { 男, 女 } class Program原创 2013-12-25 21:29:17 · 584 阅读 · 0 评论 -
c# 不用IDE编程
环境:编译器:C:\Windows\Microsoft.NET\Framework\v4.0.30319/csc.exe把这个路径加到path环境变量编动态库csc /target:library PrintName.cscsc /reference:PrintName.dll namespace.cs原创 2013-12-26 16:16:40 · 1197 阅读 · 0 评论 -
C#在子类中调用父类的有参构造函数
using System;class A{ public A() { Console.WriteLine("我是A类的无参构造函数"); } public A(int i) { Console.WriteLine("我是A类的第一个有参构造器"); }}class B:A{ public B()原创 2013-12-27 10:50:44 · 11628 阅读 · 1 评论 -
C#在无参构造器中初始化成员变量
using System;#region/*/// /// 类定义/// class Person{ //成员变量 int name; int height; //成员方法 void eat() { }}class Test{ static void Main() {原创 2013-12-27 10:33:28 · 1375 阅读 · 0 评论 -
C#静态构造函数
using System;class A{ public static int i = 100;}class Test{ static void Main() { //B b = new B(1); }}静态构造函数是实现对一个类进行初始化的方法成员。它一般用于对静态数据的初始化。静态构造函数不能有参数,不能有修饰符而且不能被原创 2013-12-27 13:41:56 · 644 阅读 · 0 评论