Speaking at the Victoria .NET Users Group

I’ll be speaking tomorrow to the Victoria .NET Users Group. The topic is introducing Visual Studio 2005.

I’ll cover some of the new features that previous versions don’t have, as well as give an overview of all the new editions. So, if you’re in Victoria and you’re not related to me, come down to UVic at 7pm. We’ll be in Cornett B112.

Resharper 2.0 is going to be sweet

If I was told I could choose only one add-in for VS, it would definitely be ReSharper. Even the modest functionality that they came out with Version 1.0 was worth the price. And now they have Version 1.5. I found out from Phil that they’re increasing the price to $149. Don’t care, already got it. It’s still totally worth getting if you don’t.

But what really got me going was that they’re “offering free upgrades from ReSharper 1.x to our new baby, ReSharper 2.0.” And then, via Larkware News’ Mike Gunderloy, we have the new feature list for 2.0. Man! That is sweet! I’m really looking forward to it. Especially now that I’ve started playing with VS 2005 and found the refactoring and code generation support to be lacking compared to what I have with ReSharper. I’ve even changed my keyboard settings so Extract Method is Ctrl-Alt-M in VS 2005. It’s just not the same.

IEnumerable<T> in .NET 2.0 Beta 2

I’ve started playing with the full version of Visual Studio 2005, the Feb CTP. I’ve abandoned the Express edition because they stripped it of all functionality. No wonder they’re giving it away free. No Add-Ins, no refactorings: do they think that hobbyists and students are idiots and won’t want those features?

Anyway, I had some code that worked with Beta 1, but was broken when I re-compiled in Beta 2. I eventually found that IEnumerable<T> implements IEnumerable in Beta 2. So if you have a class that implements IEnumerable<T>, you’ll get a compiler error that is pretty confusing. Suppose you have a class that implements IEnumerable<T>:

public class ExampleCollection : IEnumerable<Example>
{
  public IEnumerator<Example> GetEnumerator()
  {
    //give examples
  }
}

When you compile in Beta 2, you’ll get the following error: ExampleCollection does not implement interface member ‘System.Collections.IEnumerable.GetEnumerator(). ExampleCollection is either static, not public, or has the wrong return type. At first, I thought: “No shit. Of course I don’t implement interface IEnumerable, I implement the generic one. Stupid computer!” But it just sat there silently mocking me.

Then I looked at the docs, and saw that in Beta 2, the generic IEnumerable<T> inherits from IEnumerable as I mentioned earlier. And, as you all know, if you want to implement interface methods with the same signature that differ by return type, you have to implement one of them explicitly. So adding the following to your class will now be required:

public class ExampleCollection : IEnumerable<Example>
{
  public IEnumerator<Example> GetEnumerator()
  {
    //give examples
  }

  IEnumerator IEnumerable.GetEnumerator()
  {
    return GetEnumerator();
  }
}

Perhaps the compiler error message should be a little more clear on that.

It’s Alive! It’s Alive!

ScottWater has a very informative post about the state of .Text, my blog engine of choice, that, quite frankly, should have been posted months ago. Every time I’d search for more info on the status .Text, I’d get stuck in this link loop to sites that had no info whatsoever about .Text. I’m glad he posted it though; I’ve been thinking that a good way to learn the ins and outs of ASP.NET (I’m one of the few that uses .NET for Windows dev) is to change the things that I don’t like about .Text. It’s a big, complicated app; whenever I go looking around, I get intimidated by how much code there is. I’ve also been itching to resdesign this site ’cause it’s, um, fugly.

According to the post, Community Server Blogs is the answer to all my problems. Scott also asks that we not build our own versions of .Text, to instead wait for CS::Blogs and contribute to that.

I think I can do that.