Bart

Software Engineer - Red Gate Software

.NET Oddities #1

Published Tuesday, October 11, 2005 11:38 AM

Every now and then I come across something slightly bizarre in .NET, so I've decided to write about it, as much as anything else because I'm aware of having come across quite a few things like this, but find myself unable to remember what half of them are, so it might prove to be a useful reference.

Over recent months we've been dealing with the issue of internationalization, and yesterday it became apparent that there is a weakness in one of our processes. Namely, if a string changes between different versions of a product, we currently have no way of verifying the the foreign language translations of this string have also been updated. At the moment we just trust our translators to get this right, and probably most of the time they do, but I think it's fair to say that many of us here would sleep a lot better if we just knew that the string had been changed in the foreign language versions. Note that I'm not saying we'd know the translated strings were correct, just that they had been updated to reflect changes in the US English strings that are the default in our products.

So I've started work on a solution to this problem, and was reading the documentation for the System.Resources.ResXResourceSet class, which fits the bill nicely for a chunk of what I need to do. The thing is that this class is not present in any of the references that are imported into a VS.NET 2003 project by default, which is OK, but what struck me as odd is that to use this class you need to add System.Windows.Forms.dll as a reference. What?!? System.Windows.Forms?!? For a ResourceSet implementation? Why?

I can understand it not being in mscorlib.dll since many people will never use it, but to put something that clearly wraps a chunk of XML data, and is basically very similar to a Hashtable, into a UI library is just insane. I mean, who's idea was that? I'm writing a command-line tool, so what do I want Windows Forms for? And even if I were writing something with a GUI I'd separate the business logic into a separate back-end library, so the question still stands.

Like I said, bizarre. And there will probably be many other things as time goes on.

by James
Filed Under:

Comments

No Comments
You need to sign in to comment on this blog

















<October 2005>
SuMoTuWeThFrSa
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345
Virtual Exchange Servers
 Microsoft now supports running Exchange Server 2007 in server virtualization environments, not just on... Read more...

Virtualizing Exchange: points for discussion
 With the increasing acceptance of the use of Virtualization as a means of providing server... Read more...

Encouraging .NET Reflector Add-ins
 Jason Haley is well-known for the resources he's provided to developers who wish to extend Reflector's... Read more...

Using .NET Reflector Add-ins
 .NET Reflector by itself is great, but it really comes into its own with the help of some add-ins. Here... Read more...

Unique Experiences!
 You'd have thought that a unique constraint was an easy concept - Not a bit of it; it can cause a lot... Read more...