[.net] Favorite addition to .Net 2.0?

Started by
25 comments, last by KyleL 18 years, 4 months ago
So guys, many of you have been working with .net 2.0 / VS2005 for some time now. What are your favorite additions both to languages and the .net classes themselves? My favorite language addition would have to be generics and I'm sure most will agree with that. So far my favorite class addition is the GZipStream class. Thats a pretty handy little thing even in the days of huge hard drives and broadband internet! -Kyle
Advertisement
Just installed it, and wondering wether partial types are really that necessary, I guess if you have a class that does a lot of work you can split it down into logical parts, however, it still seems like they are more trouble than they are worth, then again it might be one of those 'oh damn now I have to move to the next version' problem :)

A wise man can learn more from a foolish question, than a fool can learn from a wise answer - Bruce Lee
I really don't know if theres much use to partial classes as of yet. With the release of WinFX/WPF For XP partial classes will be fun though. Combining XAML and code with partial classes <3

-Kyle
Partial classes fix one major oddity with ASP.NET. In 1.x the .aspx pages compile into classes derived from the codebehind pages, which leads to strangeness where if your codebehind wants to use a control defined in the .aspx, you actually declare the control in your codebehind class as a protected instance so that the .aspx can use it. The definitions can be completely missing and stuff would still work. In ASP.NET 2.0 the codebehind and .aspx files are complementary partial classes.

My favorite feature is probably generics. As for favorite classes, winforms 2.0 has a lot of new container classes, and is just a lot more fun to work with.

Quote:Original post by Fluxtah
Just installed it, and wondering wether partial types are really that necessary, I guess if you have a class that does a lot of work you can split it down into logical parts, however, it still seems like they are more trouble than they are worth, then again it might be one of those 'oh damn now I have to move to the next version' problem :)

They work very well when parts of a class are being generated automatically.

Personally, my two favourite features are generics and anonymous delegates.

--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
I'm really fond of the additions made to ASP.NET. The original ASP.NET lacked so many features that made me hate it. With additions like the Master Page have made me like it almost more then PHP. I haven't really experimented with C# 2.0 or anything else yet.
Rob Loach [Website] [Projects] [Contact]
anonymous delegates, yes!
generics, yes!
half-decent type inference, yes!
decent collections library, yes!
partial classes, other than to make winforms bearable, no!
die or be died...i think
Quote:Original post by Qatal
anonymous delegates, yes!
generics, yes!
half-decent type inference, yes!
decent collections library, yes!
partial classes, other than to make winforms bearable, no!


yes, yes, yes, oh yes! no

have a nice day

(i probably sound like I'm advertising Bon Jovi's song 'Have a nice day' but I'm not [grin])
Other than the ones already mentioned, I really like the new built-in Resource Editor (for adding icons, bitmaps, whatever to your EXE) a lot better than what you had to do in the previous versions of the IDE.
Quote:Original post by Fluxtah
Just installed it, and wondering wether partial types are really that necessary, I guess if you have a class that does a lot of work you can split it down into logical parts, however, it still seems like they are more trouble than they are worth, then again it might be one of those 'oh damn now I have to move to the next version' problem :)


if a class does a lot of work, its probably doing more than one thing. in which case you probably want to do something about it, like refactoring.
die or be died...i think

This topic is closed to new replies.

Advertisement