Beware overloaded operators in .net (for java programmers)

| June 6, 2013 | Reply

The following screenshot will be enough to make a fool of myself. As one can see the to variable is NULL. Why am I inside the if body then?

dotnet4life

I don’t know. I tried all kinds of variations of this piece of .. code. It turns out that the == operator is overloaded for the type Station. I have a solid java and some c++ background and it took me some time to understand what’s wrong. Java programmers beware.

Tags: , , ,

Category: Development

About the Author ()

Leave a Reply