Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1032609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:06:14+00:00 2026-05-16T14:06:14+00:00

This is, probably, a very simple answer for someone. I have a method with

  • 0

This is, probably, a very simple answer for someone. I have a method with an Optional Parameter like so;

public static Email From(string emailAddress, string name = "")
    {
        var email = new Email();
        email.Message.From = new MailAddress(emailAddress, name);
        return email;
    }

Now, I must target .Net 3.5 and it was my understanding that Optional Parameters are part of .Net 4. However, my project builds and I double checked the Properties – Application page which states 3.5 as the target framework. Then I found a article on MSDN saying it’s a feature of C#4 in VS2010. (MSDN Article –> Named and Optional Arguments)

Can someone help clarify this for me. C#4 does not require .Net4? What are Optional Parameters ACTUALLY a part of?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:06:14+00:00Added an answer on May 16, 2026 at 2:06 pm

    Optional parameters have been supported in the CLR since 1.0. Languages like VB.Net’s have been using them since the start. While the first version of C# to support them is 4.0, it can still generate valid code for a 2.0 CLR and in fact does so. Hence you can use default parameters in 2010 if you are targeting the 3.5 CLR (or 2.0, 3.0, etc …)

    This type of support is not limited to default parameters. Many new C# features can be used on older version of the framework because they do not rely on CLR changes. Here are a few more which are supported on CLR versions 2.0 and above

    • Named Arguments: Added C# 4.0
    • Lambda Expressions: Added C# 3.0
    • Auto Properties: Added C# 3.0
    • Extension Methods: Added C# 3.0
    • Co/Contra Variance: Added C# 4.0
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I feel like the answer to this question is probably very simple, but I'm
All, This question probably has a very simple answer - something I'm overlooking. But
There is probably a very simple answer to this question, but I can't for
There is probably a really simple answer for this ... I have a project
This is probably a very simple answer, but I'm not seeing an obvious solution
This is probably a very simple question, but I can't find the answer, so
This is probably very simple, but I simply cannot find the answer myself :(
there is probably a very simple answer to this very simple question, but i
I'm aware this is probably a very simple problem with a 1-line-of-code answer but
This is probably a very simple question to answer. i am new to Rails

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.