TechEd - .Net Hidden Treasures
Not all sessions I go to have to be about new stuff, now do they. So this session was interesting because they showed some items in .Net (and SQL 2005) that not everybody knows about. I have tried to remember a few I found interesting. You won't see many details, I just can't write that fast ;-)
- Alt-Shift-F10. In VS 2005, when you know of a class that resides in a namespace, and you don't know which one, then press this key combination. VS 2005 will attempt to find it and if it does, offers to add the Using statement (or imports in VB.Net) for you.
- System.Diagnostics.Stopwatch. Exactly what is says, but you can use it to time method calls in code if you want. Check which (part of a) method is slowing your application down!
- Common Table Expressions in SQL 2005. A way to resolve recursive queries, but also a great way to do paging through a result set on the server.
- INSERT INTO [TABLE] DEFAULT VALUES. Replace [TABLE] with a table name and simply insert a row with all default values filled...
- ASP.Net ExpressionBuilder. You can add AppSettings : SettingName in the script on your ASP.Net page and ASP.Net will just read the setting for you and add it to the form. You can even build your own by creating a class that derives from ExpressionBuilder
- CultureInfo.TextInfo.ToTitleCase. pass in "this is all lower case" and get "This Is All Lower Case" back. Only works when it's all lower case though.
There was a lot more, but for that you'll have to wait until the sessions are available on the web!