Top "Optional-parameters" questions

An optional parameter is one that a caller can include in a call to a function or method, but doesn't have to.

Can you use optional parameters in a WCF service method?

I've seen posts like this and this but they are each a few years old. Can I do something like …

c# wcf optional-parameters
Setting the default value of a C# Optional Parameter

Whenever I attempt to set the default value of an optional parameter to something in a resource file, I get …

c# default-value optional-parameters
C# : overloading constructors with optional parameters & named arguments?

This isn't a question on proper coding practice, I'm just working through the semantics. lets say I have the following …

c# optional-parameters named-parameters
Multiple optional parameters calling function

Assume that i have a function like this below It takes 3 parameters and 2 have optional values private void myfunc (int …

c# function optional-parameters optional-arguments optional-variables
C# Optional Parameters or Method Overload?

Since C# added optional parameters is it considered a better practice to use optional parameters or method overloads or is …

c# coding-style overloading optional-parameters
Using an enum as an optional parameter

I have several methods in an application I'm working on loaded with optional parameters, some of which are enums. Currently, …

c# enums optional-parameters
C# optional parameters on overridden methods

Seems like in .NET Framework there is an issue with optional parameters when you override the method. The output of …

c# .net overriding optional-parameters
Optional dependencies in AngularJS

I'm trying to implement a controller in AngularJS which is used across multiple pages. It makes use of some services. …

javascript angularjs dependency-injection optional-parameters
Optional Template parameter

Is it possible to have optional template parameter in C++ , for example template < class T, class U, class V&…

c++ templates optional-parameters
Should you declare methods using overloads or optional parameters in C# 4.0?

I was watching Anders' talk about C# 4.0 and sneak preview of C# 5.0, and it got me thinking about when optional …

c# c#-4.0 overloading optional-parameters