会员
众包
新闻
博问
闪存
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
TravelingBirds
有责任,我们才有共识.
博客园
首页
新随笔
联系
订阅
管理
一道程序运行结果题
class
Car
{
private
int
iYear
=
0
;
private
string
sName
=
""
;
public
Car()
{
}
public
Car(
int
year,
string
name)
{
Car oTemp
=
new
Car();
Car oStructure
=
new
Car(oTemp);
this
.iYear
=
year;
this
.sName
=
name;
Console.WriteLine(
"
Structureone
"
);
Console.WriteLine(
this
.iYear );
Console.WriteLine(
this
.sName );
}
public
Car(Car ocar)
{
this
.iYear
=
ocar.iYear;
this
.sName
=
ocar.sName;
Console.WriteLine(
"
Structuretwo
"
);
Console.WriteLine(
this
.iYear );
Console.WriteLine(
this
.sName );
}
class
Program
{
static
void
Main(
string
[] args)
{
Car oCarOne
=
new
Car(
1983
,
"
Eagle
"
);
Car oCarTwo
=
new
Car(oCarOne);
Console.Read() ;
}
}
- Make people around you successful is the biggest contribution to ourselves. -
posted on
2008-03-12 15:44
zencorn
阅读(
143
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部