[.net] Useful/obscure .Net classes

Started by
20 comments, last by mutex 17 years ago
Maybe the RegEx class is too obvious but judging by the amount of code I see that has dozens of lines of manual string parsing code to do something that would be a simple regular expression it seems there's still a lot of programmers out there who aren't familiar with regular expressions.

MSBuild (and the associated framework classes) is definitely worth looking into for any build scripting tasks, it's quite powerful, though the syntax of the project files can be a little cryptic.

Game Programming Blog: www.mattnewport.com/blog

Advertisement
Tip 1: If you want to render your own controls, System.Windows.Forms.Visualstyles contains classes to render using the applied visual style (i.e. Luna, Aero). My custom buttons were looking ancient until I discovered it.

Tip 2: VS 2005 lets you define application settings and will automatically generate code to read/write settings and access them programatically (new projects get a Settings.settings file under the Properties subfolder). The Type of the setting has a list of commonly used types. Clicking "Browse" on that list presents a tree with a lot more types from the BCL, but none from your project.

Now the tip: You can use a type from your project by specifying its full name in the "Selected type" edit box. There's a bug where doing so will add a self-reference to your project, but just delete that new reference and everything works.


This topic is closed to new replies.

Advertisement