One of my most favorite C# snippet is following oneliner useful when quick debugging or checking on something is needed.
1 |
Newtonsoft.Json.JsonConvert.SerializeObject(new {foo = "bar")) |
Which returns String containing JSON representation of arbitrary C# object. The reason I like it is that it gives me quick and easy way to imidiatelly see how the object looked like or how it changes.