Generic method with a generic interface?

IView { } (The above can be done starting in C# 4.0) Otherwise, you should be able to write your method signature like below void ShowView(string viewName) where T : IView where U : Screen { // code } And invoke it like ShowView("blah").

IView is not an IView without providing variance to the interface interface IView { } (The above can be done starting in C# 4.0) Otherwise, you should be able to write your method signature like below void ShowView(string viewName) where T : IView where U : Screen { // code } And invoke it like ShowView("blah").

This is, because every generic interface is treated as a different one. Since . NET4.0 covariance is possible and so you could use the out statement.

– oberfreak Sep 30 at 14:42 OK. I had tried it without specifying and kept getting an error. Thanks...that's what I was missing.

– devGirl Sep 30 at 14:44.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions