vs2k5

VS.NET 2k5 final and Nullable types

Got the official release installed and had to make a couple of changes to my nullable code that was written against Beta 2. All good, though. It was just taking out hacky crap that branched on INullableType in generics code. Glad to see that nullable types are null when boxed now. Way to go CLR team!

However, the ADO.NET stuff isn’t quite there yet. But at this point it’s not so much a nullable type thing instead a matter that DBNull just isn’t null, so you can’t just cast a return value to a .NET type. Still makes writing typed DB interfaces a bit annoying. But with generics, it’s at least worlds better than it was before.

By arne on | .net | A comment?
Tags: ,

Emacs Keybindings in VS.NET 2k5

Just discovered that VS.NET 2k5 has a preset under Keyboard mapping scheme’s for Emacs… Yay! It only remaps things that exist to Emacs commands, i.e. you don’t get a killring on Ctrl-Y, but it’s something.

By arne on | geek | A comment?
Tags: ,

VS.NET 2003 to 2005

I recently started playing with VS.NET 2005 Beta 2, mostly because I wanted to see the Class Designer in action. The first, pleasant surprise was that it co-exists peacefully with VS.NET 2003. I was afraid i might hose my daily dev environment with this experiment, but it seems to be ok. Haven’t tried ASP.NET yet, since the switch, but i hear that IIS is the one bone of contention with peaceful co-existence.

But enough about the pleasantries. Converting some work projects, i came across a C# language change that I’m not sure is a change or a fix for a bug. Either way it makes me change my code…

namespace ConsoleTester
{
    public class Base
    {
        protected Base()
        {
        }

        protected Base(string x)
        {
        }
    }

    public class Child : Base
    {
        private Child()
        {
        }

        public Base MakeBase()
        {
            return new Base("foo");
        }
    }
}

This works in C# 1.0, but in C# 2.0 i get Cannot access protected member ‘ConsoleTester.Base.Base()’ via a qualifier of type ‘ConsoleTester.Base’; the qualifier must be of type ‘ConsoleTester.Child’ (or derived from it). So is this a change in the spec, a bug in 1.0 or a bug in 2.0?

By arne on | .net | A comment?
Tags: