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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:39:02+00:00 2026-06-12T07:39:02+00:00

I have a strange behavior on my c# code (asp.net code behind). I post

  • 0

I have a strange behavior on my c# code (asp.net code behind). I post here a screenshot of the watch window:

strange null comparation result

I have an object user that is null (as you can see) and the compare: user == null returns false. I don’t understand why!

Is someone here that can explain why this happens?

  • 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-12T07:39:04+00:00Added an answer on June 12, 2026 at 7:39 am

    Well you can easily write your own class which would give that result:

    public class Evil
    {
        public static bool operator ==(Evil lhs, Evil rhs)
        {
            return false;
        }
    
        public static bool operator !=(Evil lhs, Evil rhs)
        {
            return false;
        }
    }
    

    We’re only guessing, at the moment… but that explains the symptoms.

    (I’ve just tried overriding ToString, and I can’t get the desired output.)

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

Sidebar

Related Questions

I have some strange behavior occurring in an ASP.NET application that I am trying
I have come across a strange behavior with Microsoft Code Contracts that I don't
I have a strange 'destructor' Behavior in C++ Here is the code I call
I have recently found a strange behaviour inside of the ASP.NET DropDownList that I
I have realy strange behavior. I have this code (I remove unrelated code). $(function()
I have a very strange behavior with Request.Form . Here are two IIS 7
I have a horizontal animated menu that has a strange behavior because it works
i have just noticed something strange in some asp.net markup. I have a standard
I have detect a strange behavior in regexps created with the RegExp object: With
I have strange behavior with android.R.layout.simple_dropdown_item_1line while using MultiAutoCompleteTextView . The code I use

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.