Visual Studio
Visual Studio Keys
When resharper isn't available... (you should at least use CodeRush Xpress!)
| F12 | Goto Definition |
| Ctl I | Incremental search. Ctl I Ctl I uses the last search pattern. |
| Ctl - (minus) | Go back |
| Ctl-K Ctl-D | Reformat |
| Ctl arrow | Left/right moves by word |
| Ctl ] (on a brace) | Move to matching (or next) brace |
| Control-Dot | Resolve usings (also on right-click) |
MRU tabs hack from here: under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0 key, create a DWORD UseMRUDocOrdering = 1
NHibernate Mappings
In C:\Program Files\NHibernate\src extract the zip then goto C:\Program Files\NHibernate\src\src\NHibernate
Copy nhibernate-mapping.xsd and nhibernate-configuration.xsd
to C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas (Vs2005)
or C:\Program Files\Microsoft Visual Studio 9.0\Xml\Schemas (Vs2008)
Linked (shared) source
Easiest is to hack the proj file (File/@Link ). In VS= Add Existing Item/Open+Link File.
VB vs C#
int[] i = new int[10]; produces an array from i[0]-i[9] (i.Length=10)
Dim myIntegers(10) As Integer produces an array from i[0]-i[10] (i.Length=11)
VB has default properties: Public Default Property Item(I As Integer) As String
C# has indexers: public int this[int index]
Configuration/ binding
- configuration/startup/supportedRuntime to limit .Net versions (in .Net 1.0 requiredRuntime)
- assemblyBinding/dependentAssembly/assemblyIdentity and bindingRedirect if same publicKey and different version numbers (oldversion can be * wildcard)
- (Development machine.config only) runtime/developmentMode/@developerInstallation="true" tells .Net to use a "DEVPATH" environmental variable to specific paths.
Assemblies
- Move a class to another dll but allow dependencies to still see it: TypeForwardTo
Exceptions
- Exception.Data is an untyped IDictionary to pass, um, data. Don't try to put it in the Message string.