Skip to content

Instantly share code, notes, and snippets.

View bennage's full-sized avatar
📺
please stay tuned

Christopher Bennage bennage

📺
please stay tuned
View GitHub Profile
// what's a better way?
let fullName (first,last) =
match (first, last) with
"",_ | null,_ -> first
| _,null | _,"" -> last
| _ -> sprintf "%s.%s" first last
public IEnumerable<IResult> DoSomethingBaseOnType(SomeBaseClass item)
{
var function = _typeToFunction[item.GetType()];
foreach (var result in function(item))
{
yield return result;
}
}
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Xunit;
public class When_overriding_GetHashCode
{
[Fact]
public void Equals_should_be_overridden()
{