SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How Could I set optional parameters when programing in sharepoint. Now I'm while debuging getting error:

Feature 'optional parameter' cannot be used because it is not part of the 3.0 C# language specification

Please help.

share|improve this question

In VS2010, you can use optional parameters with .NET 3.5. See this link for solution.

Right Click on the project

Go to properties

Go to Build Tab

Click on ‘Andvanced’

Set language version to ‘default’
Save the project

share|improve this answer

Optional parameters are C# 4.0 language feature and not 3.0. Moreover, SharePoint development is not done in 4.0 but in 3.5

share|improve this answer
I kcow, but how could I use them in Sharepoint ? I couldn't ? – Grzegorz Z Feb 5 '13 at 10:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.