Skip to content

Instantly share code, notes, and snippets.

@he-dev he-dev/outT.cs
Last active Apr 5, 2018

Embed
What would you like to do?
outT.cs
interface IRequest<out T>
{
T Create();
}
class WebRequest<T> : IRequest<T>
{
public virtual T Create() { return default; }
}
class HttpWebRequest1 : WebRequest<HttpWebRequest1>
{
public override HttpWebRequest1 Create() { return null; }
}
class HttpWebRequest2 : WebRequest<HttpWebRequest2>
{
public override HttpWebRequest2 Create() { return null; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.