Pages

Wednesday, July 24, 2013

Feature optional parameter cannot be used because it is not part of the 3.0 c#

Introduction

Currently I’m working on a module which I have  to make use of optional parameters in C#.

Problem Background

There was an error saying “Feature optional parameter cannot be used because it is not part of the 3.0 c#” when I tried to create a method with optional parameters.
01

Solution

Do these property change in project.
    1. Go to Project
    2. Right Click on the project
    3. Go to properties
    4. Go to Build Tab
02
    1.  Click on ‘Andvanced’
03
    1. Set language version to ‘default’
04
  1. Save the project

Conclusion 

Thats all. Hope this will help.

No comments:

Post a Comment