Jump to content
  • Advertisement
Sign in to follow this  
KyleL

[.net] Favorite addition to .Net 2.0?

This topic is 4596 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
anonymous delegates, yes!
generics, yes!
half-decent type inference, yes!
decent collections library, yes!
partial classes, other than to make winforms bearable, no!

Share this post


Link to post
Share on other sites
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])

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!