Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: abstarct class basic question Pin
PozzaVecia1-Jun-11 4:03
PozzaVecia1-Jun-11 4:03 
AnswerRe: abstarct class basic question Pin
BobJanova1-Jun-11 1:40
BobJanova1-Jun-11 1:40 
GeneralRe: abstarct class basic question Pin
PozzaVecia1-Jun-11 1:52
PozzaVecia1-Jun-11 1:52 
GeneralRe: abstarct class basic question Pin
BobJanova1-Jun-11 1:53
BobJanova1-Jun-11 1:53 
GeneralRe: abstarct class basic question Pin
PozzaVecia1-Jun-11 2:09
PozzaVecia1-Jun-11 2:09 
AnswerRe: abstarct class basic question Pin
_Erik_1-Jun-11 4:10
_Erik_1-Jun-11 4:10 
GeneralRe: abstarct class basic question Pin
PozzaVecia1-Jun-11 5:24
PozzaVecia1-Jun-11 5:24 
GeneralRe: abstarct class basic question Pin
_Erik_2-Jun-11 2:00
_Erik_2-Jun-11 2:00 
Member 4282287 wrote:
I need to access to proprieties, methods, etc of class

That does not depend on how you create the objects, I mean, your Create method will not help you to achieve what you want. If you can access KM property of a D1 object which you have declared as its base class type (b in this case), you can becouse KM property is definied within the "b" class interface, but not becouse you have made such a strange Create method. So in your sample:

C#
b myClassAb = new D1();
b newClassAb = myClassAb.Create();
Console.WriteLine(newClassAb.KM)


You don't need the Create method at all. Just use the constructor and one instance of the object:

C#
b myClassAb = new D1();
Console.WriteLine(myClassAb.KM)

GeneralRe: abstarct class basic question Pin
PozzaVecia2-Jun-11 2:11
PozzaVecia2-Jun-11 2:11 
QuestionC# COM Interop Pin
Vijjuuu.31-May-11 19:15
Vijjuuu.31-May-11 19:15 
AnswerRe: C# COM Interop Pin
BobJanova31-May-11 23:05
BobJanova31-May-11 23:05 
AnswerRe: C# COM Interop Pin
Mirko19801-Jun-11 0:12
Mirko19801-Jun-11 0:12 
AnswerRe: C# COM Interop Pin
Eddy Vluggen1-Jun-11 0:57
professionalEddy Vluggen1-Jun-11 0:57 
AnswerRe: C# COM Interop Pin
DaveyM691-Jun-11 0:59
professionalDaveyM691-Jun-11 0:59 
QuestionBitmap.SelectActiveFrame Pin
H@is@here31-May-11 12:53
H@is@here31-May-11 12:53 
QuestionLoad image that really are 2 images into imagelist Pin
manchukuo31-May-11 9:20
manchukuo31-May-11 9:20 
AnswerRe: Load image that really are 2 images into imagelist Pin
Mark Salsbery31-May-11 11:19
Mark Salsbery31-May-11 11:19 
GeneralRe: Load image that really are 2 images into imagelist Pin
manchukuo31-May-11 11:28
manchukuo31-May-11 11:28 
Questionhow to put imagens randomly? Pin
Rapsten31-May-11 5:56
Rapsten31-May-11 5:56 
AnswerRe: how to put imagens randomly? Pin
RobCroll31-May-11 13:15
RobCroll31-May-11 13:15 
QuestionRectanlgeF.Parse(string s) extension method? Pin
Chesnokov Yuriy31-May-11 1:58
professionalChesnokov Yuriy31-May-11 1:58 
AnswerRe: RectanlgeF.Parse(string s) extension method? Pin
Not Active31-May-11 2:03
mentorNot Active31-May-11 2:03 
AnswerRe: RectanlgeF.Parse(string s) extension method? Pin
Chesnokov Yuriy31-May-11 2:22
professionalChesnokov Yuriy31-May-11 2:22 
AnswerRe: RectanlgeF.Parse(string s) extension method? [modified] Pin
musefan31-May-11 2:26
musefan31-May-11 2:26 
GeneralRe: RectanlgeF.Parse(string s) extension method? Pin
Pete O'Hanlon31-May-11 2:33
mvePete O'Hanlon31-May-11 2:33 

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.