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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:33:33+00:00 2026-06-15T20:33:33+00:00

So, as far as a question to a real problem goes, this probably isn’t

  • 0

So, as far as a question to a real problem goes, this probably isn’t a very good question, but it’s bugging me and I can’t find an answer, so I consider that to be a problem.

What is the specificity of var? The MSDN reference on it states the following:

An implicitly typed local variable is strongly typed just as if you had declared the type yourself

Bur it doesn’t seem to say anywhere what type it is strongly typed for. For example, if I have the following:

var x = new Tree();

But I then don’t call any methods of Tree, is x still strongly typed to tree? Or could I have something like the following?

var x = new Tree();
x = new Object();

I’m guessing this isn’t allowed, but I don’t have access to a compiler right now, and I’m really wondering if there are any caveats that allow unexpected behaviour like the above.

  • 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-15T20:33:34+00:00Added an answer on June 15, 2026 at 8:33 pm

    It’s strongly typed to the type of the expression on the right side:

    The var keyword instructs the compiler to infer the type of the variable from the expression on the right side of the initialization statement.

    From here.

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

Sidebar

Related Questions

This is a very lame question, but I have struggled with it far too
This is a common question, but the explanations found so far and observed behaviour
I have seen this question asked several times but the answers have so far
See question. I can find documentation on the 5000 series and 7000 series but
First off, I'd love to post some real code for this question, but I
Hello this is may first question and I have found so far the following
As far as I know, C2DM is per app per device thing..but my question
I really wonder why this question hasn't popped up here so far. I have
Although the context of this question is about making a 2d/3d game, the problem
(EDIT: I have asked the wrong question. The real problem I'm having is over

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.