Various .NET snippets for things I can't remember :(