Skip to content

Instantly share code, notes, and snippets.

@Arkatufus
Created October 6, 2021 18:01
Show Gist options
  • Save Arkatufus/b76b37fb6ff07c5355abb3043a063654 to your computer and use it in GitHub Desktop.
Save Arkatufus/b76b37fb6ff07c5355abb3043a063654 to your computer and use it in GitHub Desktop.
public interface IMyInterface
{
TOut MyMethod<TOut>(object message);
}
public interface IMyInterface<TIn> : IMyInterface
{
TOut MyMethod<TOut>(TIn message);
}
public class MyImplementation : IMyInterface<string>
{
public TOut MyMethod<TOut>(string message)
{
throw new System.NotImplementedException();
}
public TOut MyMethod<TOut>(object message)
{
return MyMethod<TOut>((string)message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment