Click here to Skip to main content
15,902,862 members
Home / Discussions / C#
   

C#

 
QuestionCopy and Past shortcuts stop working when derived form shown non-modally. Pin
Vengeance6-Sep-06 12:50
Vengeance6-Sep-06 12:50 
Questiongeneric inherited class Pin
daveroberge6-Sep-06 9:33
daveroberge6-Sep-06 9:33 
AnswerRe: generic inherited class Pin
Nader Elshehabi6-Sep-06 10:17
Nader Elshehabi6-Sep-06 10:17 
GeneralRe: generic inherited class Pin
daveroberge6-Sep-06 10:46
daveroberge6-Sep-06 10:46 
QuestionRe: generic inherited class Pin
Nader Elshehabi6-Sep-06 11:30
Nader Elshehabi6-Sep-06 11:30 
AnswerRe: generic inherited class Pin
daveroberge6-Sep-06 14:04
daveroberge6-Sep-06 14:04 
AnswerRe: generic inherited class Pin
Nader Elshehabi7-Sep-06 1:59
Nader Elshehabi7-Sep-06 1:59 
GeneralRe: generic inherited class Pin
daveroberge7-Sep-06 3:07
daveroberge7-Sep-06 3:07 
Yes it helps me a lot for my understanding.

I thought that because c2 is inherited from c1, I1<c2> and I1<c1> was the same thing. So I1<c1> is the base of I1<c2> and in this case, it could be possible to cast from a I1<c2> to I1<c1>.

The problem with your solution #1 is that I can't put both return value from GetG1() & GetG2() in the same objet or an array of the same type (Ex: I1<c1>[]). The solution #2 is better but you're gonna be able to add an object of type c1.

Is there a pattern to do what I want? I mean, you have a factory accepting a base class X and you want to inherite a new factory but in this one, you only want to accept an inherited class from X.

Thanks for your help!!!
GeneralRe: generic inherited class Pin
Nader Elshehabi7-Sep-06 9:04
Nader Elshehabi7-Sep-06 9:04 
GeneralRe: generic inherited class Pin
daveroberge7-Sep-06 10:53
daveroberge7-Sep-06 10:53 
GeneralRe: generic inherited class Pin
Nader Elshehabi7-Sep-06 11:26
Nader Elshehabi7-Sep-06 11:26 
GeneralRe: generic inherited class Pin
daveroberge7-Sep-06 14:31
daveroberge7-Sep-06 14:31 
AnswerRe: generic inherited class Pin
Ed.Poore6-Sep-06 12:01
Ed.Poore6-Sep-06 12:01 
GeneralRe: generic inherited class Pin
daveroberge6-Sep-06 14:09
daveroberge6-Sep-06 14:09 
GeneralRe: generic inherited class Pin
Ed.Poore6-Sep-06 18:38
Ed.Poore6-Sep-06 18:38 
GeneralRe: generic inherited class Pin
daveroberge7-Sep-06 2:54
daveroberge7-Sep-06 2:54 
QuestionPlacing description into a class/method??? Pin
Goalie356-Sep-06 8:55
Goalie356-Sep-06 8:55 
AnswerRe: Placing description into a class/method??? Pin
Nader Elshehabi6-Sep-06 9:13
Nader Elshehabi6-Sep-06 9:13 
GeneralRe: Placing description into a class/method??? Pin
Goalie356-Sep-06 9:31
Goalie356-Sep-06 9:31 
GeneralRe: Placing description into a class/method??? Pin
Nader Elshehabi6-Sep-06 9:46
Nader Elshehabi6-Sep-06 9:46 
JokeRe: Placing description into a class/method??? Pin
Not Active6-Sep-06 9:56
mentorNot Active6-Sep-06 9:56 
JokeRe: Placing description into a class/method??? Pin
Nader Elshehabi6-Sep-06 10:36
Nader Elshehabi6-Sep-06 10:36 
QuestionHTML to MS Word or RTF Pin
Nadia Monalisa6-Sep-06 8:27
Nadia Monalisa6-Sep-06 8:27 
AnswerRe: HTML to MS Word or RTF Pin
led mike6-Sep-06 10:18
led mike6-Sep-06 10:18 
GeneralRe: HTML to MS Word or RTF Pin
Nadia Monalisa6-Sep-06 10:23
Nadia Monalisa6-Sep-06 10:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.