码迷,mamicode.com
首页 > Windows程序 > 详细

C# 函数

时间:2017-11-05 17:27:22      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:int   函数   out   表示   c#   ref   style   return   public   

public/private/protectd  -三种修饰符号

public static void a()

{

    console.writeline("");

}                                                  --无参数,无返回值

public static string a()

{

  return "b"

}                                                  --无参数,有返回值

public static void a(int x,int y)

{

  console.writeline(x+y);

}                                                   --有参数     参数内 可以填 ref ,表示可进可出;也可填 out,只进不出

 

C# 函数

标签:int   函数   out   表示   c#   ref   style   return   public   

原文地址:http://www.cnblogs.com/m110/p/7787714.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!