One of my most favorite C# snippet is following oneliner useful when quick debugging or checking on something is needed.
|
Newtonsoft.Json.JsonConvert.SerializeObject(new {foo = "bar")) |
Which returns String containing JSON representation of arbitrary C#… Read more »
Recently I encountered following problem in C#.
|
System.InvalidOperationException was unhandled by user code Message: The 'Id' property on 'SomeDAO' could not be set to a 'System.Decimal' value. You must set this property to a non-null value of type 'System.Int64'. |
This error is pretty obvious in certain context, but if you don’t read it carefully enough, in some situations you might get… Read more »