Skip to content

Instantly share code, notes, and snippets.

View sdedalus's full-sized avatar

David Lewis sdedalus

View GitHub Profile
@sdedalus
sdedalus / TypeContainer.cs
Created November 23, 2016 02:27
A quick example of the use of generics to avoid boxing
public interface ITypeContainer
{
Type ContainedValueType { get; }
IValueContainer<T> ToContainedType<T>();
object ValueAsObject { get; }
}
public interface IValueContainer<T> : ITypeContainer
{