1.引用B命名空间,在A中:
B1 x=new B.B1();
2.继承TextBox控件的例子:
public class NumbcBox : System.Windows.Forms.TextBox
{
private int x; //小数位数
public int DecimalDigits
{
get
{
return x;
}
set
{
if(value<0)
throw new System.Exception("小数位数不能为负!");
else
x=value;
}
....
}
B1 x=new B.B1();
2.继承TextBox控件的例子:
public class NumbcBox : System.Windows.Forms.TextBox
{
private int x; //小数位数
public int DecimalDigits
{
get
{
return x;
}
set
{
if(value<0)
throw new System.Exception("小数位数不能为负!");
else
x=value;
}
....
}
{
public BackLink()
{
Text = "Back";
}
}