Category Archives: .NET

C# vs F#: some parallel refactoring (and generalization)

So, shortly after adding the more in depth examples in my last post, I started playing around with the TryParse method in C# to see how “nice” I could make the example code:
public class User
{
public int Age { get; set; }
public DateTime SignupDate { get; set; }
[...]

Tuples rock my world

Value types in the .NET framework tend to have a static TryParse method for converting a string to a typed value.  Well, most of them do, the Guid type doesn’t for some reason.  The method takes a string and an output parameter for the result.
Output parameters suck and require a local variable to be passed [...]