是否有“默认Peremeter”在C#? [英] Is there "Default Peremeter" in C#?
本文介绍了是否有“默认Peremeter”在C#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
似乎当我定义一个函数时,我可以设置一个默认值为
peremeters。当我在没有它们的情况下调用函数时,函数会
自动使用默认值然后继续工作。但是我会怎样使用
,即使我不知道我是否可以在C#中使用它。
帮助我。
解决方案
C#没有默认参数,它使用重载isntead。
" Clark Nu < CL ***** @ hit.edu.cn>在留言中写道
新闻:O7 ************** @ TK2MSFTNGP10.phx.gbl ...似乎当我定义一个函数,我可以设置一些默认值。当我在没有它们的情况下调用函数时,函数
将自动使用默认值然后继续工作。但是我'v fogot
如何使用,即使我不知道我是否可以在C#中使用它。
帮助我。
你可以加快时间吗?
$ b $bJosé
" Clark Nu" < CL ***** @ hit.edu.cn>一个écritdansle message de
新闻:O7 ************** @ TK2MSFTNGP10.phx.gbl ...似乎当我定义一个函数时,我可以为peremeters设置一个默认值。当我在没有它们的情况下调用函数时,函数
将自动使用默认值然后继续工作。但是,如果使用的话,我会发现
如何使用,甚至我是不会在C#中使用它。
帮助我。
" news.microsoft.com" <一个******** @ discussions.microsoft.com> schrieb im
Newsbeitrag新闻:#S ************** @ TK2MSFTNGP11.phx.gbl ...C#没有默认值参数,它使用重载isntead。
你的名字不是news.microsoft.com,是吗?
-
cody
[免费软件,游戏和幽默]
www.deutronium.de.vu || www.deutronium.tk
It seems that when I define a fuction,I can set a default value to some of
the peremeters.When I call the fuction without some of them,the fuction will
use the default value automaticlly then continue to work.But I''v fogot how
to use,even I''v fogot whether I can use it in C# or not.
Help me.
解决方案
C# has no default parameters, it uses overloading isntead.
"Clark Nu" <cl*****@hit.edu.cn> wrote in message
news:O7**************@TK2MSFTNGP10.phx.gbl...It seems that when I define a fuction,I can set a default value to some of
the peremeters.When I call the fuction without some of them,the fuction will use the default value automaticlly then continue to work.But I''v fogot how to use,even I''v fogot whether I can use it in C# or not.
Help me.
Could you upate your clock?
José
"Clark Nu" <cl*****@hit.edu.cn> a écrit dans le message de
news:O7**************@TK2MSFTNGP10.phx.gbl...It seems that when I define a fuction,I can set a default value to some of
the peremeters.When I call the fuction without some of them,the fuction will use the default value automaticlly then continue to work.But I''v fogot how to use,even I''v fogot whether I can use it in C# or not.
Help me.
"news.microsoft.com" <an********@discussions.microsoft.com> schrieb im
Newsbeitrag news:#S**************@TK2MSFTNGP11.phx.gbl...C# has no default parameters, it uses overloading isntead.
You name isn''t really news.microsoft.com, is it?
--
cody
[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
这篇关于是否有“默认Peremeter”在C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文