Wednesday, December 4, 2024
Technology

Problem with C# IDE

.NET Logo

Since I’m pulling some of my old forum entries out and dusting them off, I thought that I’d include this one too. I’m commenting on some of the differences between VB.net and C# … the IDE that is, not the languages. At this point, I’ve decided that I’m pretty much language neutral.


I know that VB.net and C# “technically” have the same IDE (VS.net), but we all know that different teams work on the two language implementations (that’s why C# has xml commenting and VB.net does not — until VS.net 2005 any way). I’ve run in to a *frustrating* anomaly with the C# IDE, and I’m wondering if any one else has had a similar experience… and perhaps a solution.

I like component classes. I like that I can make data access layers using drag and drop from the server explorer for my common database components (dbConnections, Data Adapters, Command Objects, etc.) I know that a lot of *purest* c# people would never think of using drag and drop anything, but I like them. It makes my development experience easier, faster, and more productive… that is, until I tried them in C#.

In C# project that I am currently working on I have a component class. On the design for I have added 3 db connections, (Production, Test, and Reports) and two command objects. Everything looks great, looks good, until I save and re-open my project. Now, my db connections are there, but my command objects are missing. Oh, the code is still there, but they are no longer on the design surface. That’s OK, until I try to add a new command object, then two things really bad happen.

The first is that the new command object doesn’t recognize the 3 existing db connections, and so it wants to pull over a new db connection. The second is worse; while the code for the db connections is fine, all of the code (except the declarations) for the other 2 objects gets erased and replaced with the code for the new object! I’ve done this a million times in VB, and this has never happened. The worst is that sometimes the design surface gets cluttered with with the command objects from a data adapter that I don’t care to see, but VB never lost my objects! I wouldn’t mind it if the C# team had simply said, “no, we are not going to have drag and drop anything.”, but it really bugs me to have something there and just not working.

Has anyone else run in to this? Is there a simple fix, that I am just unaware of? I can see why most C# developers would want to do everything by hand, if this is the IDE experience that they are used to!

Thanks for letting me rant on a bit… this is good therapy.


Update: (Friday, September 03, 2004) While I’m on the subject. Let me also mention the way that the C# IDE handles the synchronization between a aspx page and the underlying cs code behind page. Terribly.

How many times am I going to have to manually update the code behind just because I changed the ID of some element on the UI? Why does everything break when I delete an event that I’m not using any more. The IDE added the “this.Button.Click +=” stuff for me, if I remove the button from my form, then the IDE should also remove the initialization code. It disturbs me when an IDE adds code, but then won’t manage it self.

We never had these problems with the VB.net IDE… then again VB.net doesn’t support (bool)? true:false; evaluations… and I love those. Oh well, this too shall pass.

Similar Posts