Skip to content

Instantly share code, notes, and snippets.

@krcourville
krcourville / gist:5966257
Last active October 16, 2017 07:19
Snippet for JavaScript regions. Place in your personal My Snippets folder (Documents/Visual Studio xxxx) or the global folder: \Program Files (x86)\Microsoft Visual Studio xx.x\JavaScript\Snippets\1033\JavaScript
<CodeSnippet Format="1.1.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>region</Title>
<Author>Ken Courville</Author>
<Shortcut>try</Shortcut>
<Description>Code snippet for a region statement</Description>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
@krcourville
krcourville / gist:5818395
Created June 19, 2013 21:44
Demonstration of using generic structures to better organize mappings and the copying of data from a keyed datasource to an object.
//
// datasource
private static Dictionary<string,object> sourceData = new Dictionary<string,object>{
{"test1", "Joe"},
{"test2", DateTime.Now},
{"test3", 5}
};
//
// target object
class Foo