My Method define is
public ActionResult _Create3<T>() where T:IMyClass, new()
but I want define tow generic type
public ActionResult _Create3<T, G>(G content) where T:IMyClass, new()
Type G must also use interface ImyClass but I Dont know define in where tow type !!!
for example if may be write :
public ActionResult _Create3<T, G>(G content) where {T:IMyClass, G:IMyClass}, new()
but get error.
thanks for answer
Add another where constraint for that generic type:
public ActionResult _Create3<T, G>(G content)
where T : IMyClass, new()
where G : IMyClass, new()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With