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 7950495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:17:30+00:00 2026-06-04T02:17:30+00:00

I stumbled across this while starting to learn about vars here: http://msdn.microsoft.com/en-us/library/bb384061.aspx However, I

  • 0

I stumbled across this while starting to learn about vars here:

http://msdn.microsoft.com/en-us/library/bb384061.aspx

However, I have no idea how that is a legal expression (it is). I thought you couldn’t assign to something using an a = (b=c) because (b=c) does not produce a value to assign?

Thanks for any clarification on the matter.

  • 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-06-04T02:17:31+00:00Added an answer on June 4, 2026 at 2:17 am

    It is legal. From the = operator C# reference page:

    The assignment operator (=) stores the value of its right-hand operand in the storage location, property, or indexer denoted by its left-hand operand and returns the value as its result.

    (emphasis mine)

    The code in the example is contrived (and pointless), but it can be used in other cases to do useful things in a more concise way. For example:

    BinaryTree tree;
    TreeNode node;
    if((node = tree.FindNodeForKey(10)) != null)
    {
        // do useful things with returned node
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I stumbled across the WB on-disk B-tree library: http://people.csail.mit.edu/jaffer/WB It seems like it could
While reading a book about JavaScript I stumbled across an example: var names =
I recently stumbled across this problem while testing my C# program. parsing ) -
While browsing the Caml Light library for programming examples, I stumbled across the following
While compiling a demo from openni i stumbled across this error: Exception in thread
While investigating some localization options, I stumbled across this as a save option in
While reading the Android guide to Notifications , I stumbled across this: Adding vibration
I am using EF 4.0 and POCO's. I stumbled across this error while inserting
While trying to simulate a bit of PHP behaviour I stumbled across this: $a=array(0
I recently stumbled across this entry in the google testing blog about guidelines for

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.