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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:18:59+00:00 2026-05-16T22:18:59+00:00

User x = null; object o = x; // determine type with only reference

  • 0
User x = null;
object o = x;
// determine type with only reference to o

And Generics will NOT Work

  • 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-16T22:19:00+00:00Added an answer on May 16, 2026 at 10:19 pm

    Imagine you have a library of books. Imagine you also have a box of cards, one card for each book. (Younger readers: libraries actually used to have such systems, before computers made them obsolete.)

    Now imagine you have two trays. One tray is marked "Science Fiction" and the other tray is marked "Any book".

    The SF tray is empty.

    You tell your assistant librarian "Dump whatever is in the Any tray, then make a photocopy of whatever is in the SF tray and put the copy in the Any tray."

    After dumping the Any tray it becomes empty, and since the SF tray is empty there is nothing to photocopy, therefore the Any tray stays empty.

    The analogue of your question is now "what is the genre of the book whose card is in the Any tray?" and the answer is "there is no such genre because the Any tray is empty". It’s not like the fact that the SF tray was empty somehow "infects" the Any tray to make it "empty but SF flavoured".

    Does that make sense? Variables are just storage locations; null references are references that mean "this doesn’t reference anything at all", and there is no flavour to "nothing at all".

    For more on this distinction see my article on the subject:

    https://web.archive.org/web/20100823051812/http://blogs.msdn.com/b/ericlippert/archive/2009/10/29/i-have-a-fit-but-a-lack-of-focus.aspx

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

Sidebar

Related Questions

User click on a link button and it will direct them to a url
I'm trying to determine if a user is a member of a group or
I have a form that will not open in the designer. I used the
I have an object, based on the Singleton design, that I use for user
Here's my table schema [dbo].[Action_History]( [ActionID] [int] IDENTITY(1,1) NOT NULL, [objectID] [int] NOT NULL,
I want to return a sngle object usig a guid (its not the primary
user is null in servlet. Pls let me if doing mistake. i m trying
I am wanting to know if it's possible to instantiate a null object inside
User equals untrustworthy. Never trust untrustworthy user's input. I get that. However, I am
User kokos answered the wonderful Hidden Features of C# question by mentioning the using

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.