Is it possible to do a member overload with generic constraints? Here, I am trying to create and AddWithOption
method to support both value types and reference types. If you look at the gist, I show several attempts to make this happen.
My workaround was simply to not overload the member. I renamed with one for value types to AddWithOptionValue
. However, it would be cool if the overload worked. Any ideas?