45fan.com - 路饭网
首页
路由器设置
无线路由器
路由器密码
网络频道
手机频道
电脑频道
图库频道
问答中心
搜索:
智能搜索
搜索标题
您的位置
:
主页
>
网络频道
> 阅读资讯:C#中对象作函数参数的详细介绍
C#中对象作函数参数的详细介绍
2016-08-24 21:30:15 来源:www.45fan.com 【
大
中
小
】
C#中对象作函数参数的详细介绍
using
System;
using
System.Collections.Generic;
using
System.Text;
namespace
ConsoleApplication6
...
{
public
class
Program
...
{
static
void
Main(
string
[]args)
...
{
aaaobj
=
new
aaa(
"yourname
"
);
initAge(obj);
Console.WriteLine(obj.Age.ToString());
bbbobj2
=
new
bbb(
"
yourname
"
,
10
);
initAge2(obj2);
Console.WriteLine(obj2.Age.ToString());
}
public
static
void
initAge(aaaobj)
...
{
obj.Age
=
26
;
}
public
static
void
initAge2(bbbobj)
...
{
obj.Age
=
26
;
}
}
public
class
aaa
...
{
private
string
_name;
private
int
_age;
public
string
Name
...
{
get
...
{
return
this
._name;}
set
...
{
this
._name
=
value;}
}
public
int
Age
...
{
get
...
{
return
_age;}
set
...
{_age
=
value;}
}
public
aaa(
string
name)
...
{
this
._name
=
name;
}
}
public
struct
bbb
...
{
private
string
_name;
private
int
_age;
public
string
Name
...
{
get
...
{
return
this
._name;}
set
...
{
this
._name
=
value;}
}
public
int
Age
...
{
get
...
{
return
_age;}
set
...
{_age
=
value;}
}
public
bbb(
string
name,
int
age)
...
{
this
._name
=
name;
this
._age
=
age;
}
}
}
本文地址:
http://www.45fan.com/a/question/67135.html
Tags:
函数
原来
清楚
编辑:路饭网
上一篇:
八荣八耻的暴笑豪华版介绍
下一篇:
JAVA的类装载器的应用哪些?
相关文章列表
邓丽君墓碑遭破坏:墓园“凶手”不满照片
佟大为直播秀厨艺: 原来你是个大大大吃
如何通过SQL Function使用自定义函数?
如何通过SQl Function创建函数?
Python内置函数complex的详细知识介绍
Mongodb聚合函数count、distinct 、group
如何通过Python实现包含min函数的栈?
SQL SERVER修改函数名容易引发的问题有哪
Python中函数的可变参数的详细介绍
Python函数式编程知识分析
推广内容
推荐阅读
热门推荐
推荐文章
·
欢乐颂五美晒合照 齐呼:We are back!!
·
Google AdSense广告业务也被干扰,掉包严
·
京东和淘宝二者对比有什么区别?
·
输入新浪微博的验证码老是错误怎么办?
·
google adsense打不开怎么办?免翻墙打开
·
在淘宝网买东西要注意哪些事项?网友必备
·
阿里提供免费公共DNS服,阿里公共dns地址
·
如何进行小米真人认证?小米官方真人认证
·
怎么用PS制作出真实的眼睛?
·
招财宝有什么作用?招财宝不仅仅是余额宝
·
路饭网官方微信公众平台开通啦!赶快扫描
·
路由器连接检测工具 检测电脑上不了网的
关于我们
|
联系我们
|
友情链接
|
网站地图
|
Sitemap
|
App
|
返回顶部