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

  • SEARCH
  • Home
  • 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 971697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:00:19+00:00 2026-05-16T03:00:19+00:00

I was looking at this article and am struggling to follow the VB.NET example

  • 0

I was looking at this article and am struggling to follow the VB.NET example that explains lifted operators. There doesn’t seem to be an equivalent C# example or tutorial. I don’t have much experience with operator overloading in general, so trying to come to terms with the VB.NET equivalent whilst reading up on nullable types probably isn’t the best place to start…

Would anyone be able to provide an explanation of lifted operators and how they are used by nullable types? Does it just mean that the nullable type does not itself overload operators and will use the operators from the underlying type that it represents?

There doesn’t seem to be much information on SO about lifted operators, so hopefully this can help some others out too.

  • 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-16T03:00:20+00:00Added an answer on May 16, 2026 at 3:00 am

    Lifted operators are operators which work over nullable types by “lifting” the operators which already exist on the non-nullable form. So for example, if you do:

    int? x = 10;
    int? y = 10;
    int? z = x + y;
    

    That “+” operator is lifted. It doesn’t actually exist on Nullable<int> but the C# compiler acts as if it does, generating code to do the right thing. (For the most case, that’s a matter of checking whether either operand is null; if so, the result is null. Otherwise, unwrap both operands to their non-nullable values, use the normal operator, and then wrap the result back into a nullable value. There are a few special cases around comparisons though.)

    See section 6.4.2 (lifted conversion operators) and 7.3.7 (lifted operators) of the C# spec for more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking at this jQuery example, how can I modify the code so that it
I was looking at this wikipedia article, and couldn't understand how the hell that
I am looking at this article that describes chunking in wcf services. link here
I read this article, it suggests (page 1025 last paragraph) that there is a
I was looking at this article from 2005 and wanted to get some thoughts
looking at this example of the jquery ui slider http://jqueryui.com/demos/slider/#steps i want to be
I'm looking at this control, and it seems to be lacking the standard .net
Looking at this article from MS, I have a question about the SolutionToBuild section.
ive read this article by Mark Murphy, while i was looking for a solution
Suddenly in this article (problem 2) I see a statement that C++ Standard prohibits

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.