use of optional parameter in c#

Posted by Krishnamanohar under C# on 4/22/2013 | Points: 10 | Views : 717 | Status : [Member] | Replies : 2
Hi Experts
i have two methods .first method with one argument and second method with two parameters (second parameter is optional).
then after creating the object i call the method with only one parameter then which will be called ?first or second? then why?
Thanks In advance
Krish




Responses

Posted by: Satyapriyanayak on: 4/22/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
http://www.dotnetperls.com/optional-parameters
http://www.codeproject.com/Articles/39014/Named-and-optional-parameters-in-C-4-0


If this post helps you mark it as answer
Thanks

Krishnamanohar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gaur1982 on: 4/23/2013 [Member] Starter | Points: 25

Up
0
Down
Check this URL for much more knowledge about C# Optional Parameters : http://planetofcoders.com/c-optional-parameters/

Gaurav Agrawal
http://www.planetofcoders.com/

Krishnamanohar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response