Skip to content

Instantly share code, notes, and snippets.

David sdedalus

Block or report user

Report or block sdedalus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sdedalus
sdedalus / TypeContainer.cs
Created Nov 23, 2016
A quick example of the use of generics to avoid boxing
View TypeContainer.cs
public interface ITypeContainer
{
Type ContainedValueType { get; }
IValueContainer<T> ToContainedType<T>();
object ValueAsObject { get; }
}
public interface IValueContainer<T> : ITypeContainer
{
You can’t perform that action at this time.