public int AClassWithBReponseRefToCallAMethod() { var a = new AClass <GenericClassB>(); var gen = new GenericClassB(); a.SetReponse(gen); RefMethod(ref a); var aMoop = a.boop(); return(aMoop); }
public int AClassWithGenericReponseRefToCallAMethod <response>() where response : IGenericInterface { var a = new AClass <response>(); var gen = (response)Activator.CreateInstance(typeof(response)); a.SetReponse(gen); RefMethod(ref a); var aMoop = a.boop(); return(aMoop); }
public int AClassWithAReponseRefToCallAMethod() { var a = new AClass <GenericClassA>(); var gen = new GenericClassA(); //data would normally be populated elsewhere but for testing and example is done here a.SetReponse(gen); RefMethod(ref a); var aMoop = a.boop(); return(aMoop); }