How to set which of function inputs are required and which are not (C#)

Posted by Ole Jak on Stack Overflow See other posts from Stack Overflow or by Ole Jak
Published on 2010-04-24T16:03:47Z Indexed on 2010/04/24 16:13 UTC
Read the original article Hit count: 164

Filed under:
|
|
|
|

So I have a function

public int Sum(var valueA, var valueB, var valueC) { 
  var summ = valueA + valueB; 
  return summ; 
} 

I want to add to summ valueC if it was given. And let user not specify it if he does not want to. How to do such thing?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET