Archive

Archive for the ‘.NET’ Category

C# vs Java: casting objects and calling members

February 11th, 2011

Given these two functionally identical code samples in c# and java, what is the output?

C#:

public class A
{
  public String Method()
  {
    return "this is A";
  }
}

public class B : A
{
  public String Method()
  {
    return "this is B";
  }
}

A thisA = new B();

thisA.Method();

Java:

public class A
{
  public String Method()
  {
    return "this is A";
  }
}

public class B extends A
{
  public String Method()
  {
    return "this is B";
  }
}

A thisA = new B();

thisA.Method();

What does thisA.Method() return?

It turns out that there are two different answers to this. In .NET/C# it returns from A (“this is A”). In Java, it returns from B (“this is B”).

So far it appears that this is a type issue; new B() must be getting cast back to A in C#. Looking for some documentation on this specifically. Links anyone?

.NET, Interesting, Technology , ,

Red Gate Reflector: end of the free version

February 2nd, 2011

Red Gate announced today that they will stop offering a free version of Reflector. You can read the details over at Red Gate’s site.

No big deal, right? You can just get the current copy or an old copy and be good. Surely Lutz Roeder has a copy stored somewhere on the internet. Yeah, sure, only it won’t work.

All version of Reflector (both Lutz’s and Red Gate’s) have a little “feature” that causes Reflector to stop working after 6 months. This time bomb has always been a part of Reflector and forced you to update to the latest version.

Surely Red Gate would release a version of Reflector that doesn’t expire and won’t stop working in 6 months, right? Wrong. In 6 months the only way to use Reflector will be to pay up. Too bad you can’t use Reflector on Reflector.

Oh, and never mind Red Gate’s promise to keep it free and for the “community”, as they said back in 2008 when they acquired it from Lutz. They sure proved the anticipated “scepticism” wrong didn’t they!

But why not just release a one-time, non-expiring version of Reflector prior to making it pay-only? Is that too costly?

When I first read the news, I hit up the blogs and I have to say that I’m a little surprised at the number of devs that jumped on this and defended Red Gate without even looking into the facts. It’s almost like they are on the take from Red Gate.

The price isn’t terrible, but doesn’t sound like a great value either; as it’s basically the current version snapshot minus the time bomb. Next version? Pony up again cowboy. At $35 it’s not even close to a no-brian buy. Oh, and don’t remind me about the rising price of gas.

UPDATE: JetBrains, what a tease!

.NET , , ,

Our latest project: Live Election Results for 2010!

November 1st, 2010

That’s right, our latest project turned into a pretty big effort; live election results for the entire US! We’re allowing you to customize which races you want to watch in real-time.

The idea for this project started back in August of 2010 as a simple site to show some local live election results for one county. It was a quick and simple application that worked really well.

In October, we started working on some improvements and decided to expand the scope of the results to cover all U.S. Senate, U.S. House races, and as many states as we could before November 2nd. Oh, and we redesigned the Silverlight UI and added a ton of functionality.

On top of that, the project now includes a mobile web version for the iPhone, Android, and Blackberry devices. And a custom Windows Phone 7 client application with some really advanced features. Not to mention a ton of new really smart high-availability back-end data services.

So, yeah, lots of work and not much sleep. But it’s really awesome and we’re very happy with it. Check it out: Live Election Results for November 2nd 2010.

.NET, Agile, Announcement, Interesting, Politics, Silverlight, Technology ,