Click here to Skip to main content
15,889,578 members
Home / Discussions / C#
   

C#

 
AnswerRe: Rx - Reactive Extensions Pin
jschell15-Jul-17 7:41
jschell15-Jul-17 7:41 
Questionplaying media from server storage help.. in C# Pin
AnthonyRaven11-Jul-17 17:10
AnthonyRaven11-Jul-17 17:10 
AnswerRe: playing media from server storage help.. in C# Pin
Richard MacCutchan11-Jul-17 21:42
mveRichard MacCutchan11-Jul-17 21:42 
QuestionRfid Reader Tag number Extraction Pin
Member 132923109-Jul-17 4:18
Member 132923109-Jul-17 4:18 
AnswerRe: Rfid Reader Tag number Extraction Pin
Michael_Davies9-Jul-17 4:40
Michael_Davies9-Jul-17 4:40 
QuestionWhy can't I access a variable declared in derived class with the object of base class Pin
Member 132999538-Jul-17 7:02
Member 132999538-Jul-17 7:02 
AnswerRe: Why can't I access a variable declared in derived class with the object of base class Pin
PIEBALDconsult8-Jul-17 7:10
mvePIEBALDconsult8-Jul-17 7:10 
AnswerRe: Why can't I access a variable declared in derived class with the object of base class Pin
Dave Kreskowiak8-Jul-17 7:27
mveDave Kreskowiak8-Jul-17 7:27 
Member 13299953 wrote:
My Understanding : The statement new Rectangle(); creates an object of type Rectangle in the memory and its reference is stored in object s of type Shape. So the object s should have access to variable num defined in rectangle class. Please make me understand this concept why we can’t access num variable from Object of type Shape.

Wrong. Shape only know what's defined in the Shape class. It knows absolutely nothing about any class that inherits from it.

The reverse is also true. Rectangle knows ONLY what Shape exposes to it since it's inheriting from Shape and what's defined in the Rectangle class. Private members defined in Shape are not visible to Rectangle at all.

Inheritance only goes one way. A base class can NOT and should not know anything at all about the classes that inherit from it.
System.ItDidntWorkException: Something didn't work as expected.

A guide to posting questions on CodeProject

Click this: Asking questions is a skill.
Seriously, do it.

Dave Kreskowiak

AnswerRe: Why can't I access a variable declared in derived class with the object of base class Pin
OriginalGriff8-Jul-17 19:07
mveOriginalGriff8-Jul-17 19:07 
AnswerRe: Why can't I access a variable declared in derived class with the object of base class Pin
BillWoodruff9-Jul-17 23:02
professionalBillWoodruff9-Jul-17 23:02 
AnswerRe: Why can't I access a variable declared in derived class with the object of base class Pin
Gerry Schmitz11-Jul-17 6:48
mveGerry Schmitz11-Jul-17 6:48 
SuggestionRe: Why can't I access a variable declared in derived class with the object of base class Pin
Richard Deeming11-Jul-17 7:01
mveRichard Deeming11-Jul-17 7:01 
Questionprinter default font. Pin
rahul19957-Jul-17 1:53
rahul19957-Jul-17 1:53 
AnswerRe: printer default font. Pin
Dave Kreskowiak7-Jul-17 2:25
mveDave Kreskowiak7-Jul-17 2:25 
AnswerRe: printer default font. Pin
Pete O'Hanlon7-Jul-17 2:53
mvePete O'Hanlon7-Jul-17 2:53 
GeneralRe: printer default font. Pin
OriginalGriff7-Jul-17 4:11
mveOriginalGriff7-Jul-17 4:11 
GeneralRe: printer default font. Pin
Richard MacCutchan7-Jul-17 4:22
mveRichard MacCutchan7-Jul-17 4:22 
GeneralRe: printer default font. Pin
OriginalGriff7-Jul-17 4:30
mveOriginalGriff7-Jul-17 4:30 
GeneralRe: printer default font. Pin
Richard MacCutchan7-Jul-17 5:19
mveRichard MacCutchan7-Jul-17 5:19 
AnswerRe: printer default font. Pin
Richard Andrew x647-Jul-17 7:41
professionalRichard Andrew x647-Jul-17 7:41 
GeneralRe: printer default font. Pin
rahul19959-Jul-17 18:48
rahul19959-Jul-17 18:48 
AnswerRe: printer default font. Pin
jschell10-Jul-17 4:39
jschell10-Jul-17 4:39 
GeneralRe: printer default font. Pin
rahul199510-Jul-17 19:02
rahul199510-Jul-17 19:02 
GeneralRe: printer default font. Pin
Dave Kreskowiak11-Jul-17 3:30
mveDave Kreskowiak11-Jul-17 3:30 
Questionusing Form does not release memory Pin
Montgomery-Burns6-Jul-17 22:12
Montgomery-Burns6-Jul-17 22:12 

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.