you can use param type, which could take zero parameters or more

Rob <[EMAIL PROTECTED]> wrote:
Hiya,
This would be an example:
public void SayHello(String name)
{
            MessageBox.Show(name);
}
public void SayHello(String name, String name2)
{
            MessageBox.Show(name+”\n”+name2);
}
public void SayHello(String name, String name2, String name3)
{
            MessageBox.Show(name+\n”+name2+”\n”+name3);
}
Notice I use the same method name and just add extra parameters. This is referred to as overloading in the C# language.
Kind Regards,
Robert A Heeley
0770 4121168
The contents of this message, including any attachments, are confidential and are intended solely for the use of the person or entity to whom the message was addressed. If you are not the intended recipient of this message, please be advised that any dissemination, distribution, or use of the contents of this message is strictly prohibited. If you received this message in error, please notify the sender. Please also permanently delete all copies of the original message and any attached documentation. Thank you.

From: [email protected] [mailto:[email protected]] On Behalf Of geme_ 3030
Sent: 18 July 2006 12:23
To: [email protected]
Subject: Re: [Microsofts_C_Sharp] Ho to pass optional parameter in c#
Expalin Plz  >>> Do u Mean OverLoad Function ??

rkmnm <[EMAIL PROTECTED]> wrote:
HI

can any one tell me how to pass optional Parameter in c#.

Plz Help me how to pass it.

Thanks

Ravi Mittal
 __________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



Mohamed Meshref
Software Design Engineer
SQL Server Manageability Platform Team
Microsoft Corporation, Redmond HQ
Building 35, Office # 2201
Phone: +1-(425)704-8684
Mobile: +1-(425)445-7386
Email: [EMAIL PROTECTED]
Blog: http://www.mmeshref.com


Groups are talking. We’re listening. Check out the handy changes to Yahoo! Groups. __._,_.___


SPONSORED LINKS
Basic programming language C programming language Computer programming languages
Programming languages C++ programming language Software programming language


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to