Skip to content

Instantly share code, notes, and snippets.

@AhmedTarekHasan
Last active December 29, 2022 16:43
Show Gist options
  • Save AhmedTarekHasan/be4f9009d69eb6c352feaeffc199b72c to your computer and use it in GitHub Desktop.
Save AhmedTarekHasan/be4f9009d69eb6c352feaeffc199b72c to your computer and use it in GitHub Desktop.
public class A
{
public void F1(){}
}
public class B : A
{
public void F2(){}
}
public class C : B
{
public void F3(){}
}
public interface IReaderWriter<TEntity>
{
TEntity Read();
void Write(TEntity entity);
}
public class ReaderWriter<TEntity> : IReaderWriter<TEntity> where TEntity : new()
{
public TEntity Read()
{
return new TEntity();
}
public void Write(TEntity entity)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment