Click here to Skip to main content
15,926,281 members
Home / Discussions / C#
   

C#

 
AnswerRe: Creating Clinet/Server protocol... Pin
Colin Angus Mackay8-Mar-07 3:24
Colin Angus Mackay8-Mar-07 3:24 
AnswerRe: Creating Clinet/Server protocol... Pin
Pete O'Hanlon8-Mar-07 3:25
mvePete O'Hanlon8-Mar-07 3:25 
GeneralRe: Creating Clinet/Server protocol... Pin
yarns8-Mar-07 3:43
yarns8-Mar-07 3:43 
AnswerUse Web Services Pin
Ennis Ray Lynch, Jr.8-Mar-07 4:00
Ennis Ray Lynch, Jr.8-Mar-07 4:00 
QuestionOOPs question: whats the difference between these ways of accessing methods !!! Pin
Arindam Tewary8-Mar-07 3:05
professionalArindam Tewary8-Mar-07 3:05 
AnswerRe: OOPs question: whats the difference between these ways of accessing methods !!! Pin
N a v a n e e t h8-Mar-07 3:12
N a v a n e e t h8-Mar-07 3:12 
GeneralRe: OOPs question: whats the difference between these ways of accessing methods !!! Pin
Arindam Tewary8-Mar-07 18:00
professionalArindam Tewary8-Mar-07 18:00 
AnswerRe: OOPs question: whats the difference between these ways of accessing methods !!! Pin
Pete O'Hanlon8-Mar-07 3:23
mvePete O'Hanlon8-Mar-07 3:23 
Well, option 1 means that Q is derived from P. This means that it has access to protected methods in P. Consider the following:

class P
{
  protected bool IsValid { get { return ... ; } }
}

class Q : P
{
  public void Validate()
  {
    if (IsValid)
     ...
  }
}


Now, you can't do the same with the following:

class R
{
  private P foo = new P();
  public void Validate()
  {
    // This bit won't compile.
    if (foo.IsValid) ...
  }
}


What you are seeing is explained using IsA and HasA relationships. In the case Q, we say that Q is a P - there is an implicit inheritance chain and Q has access to certain *exposed* portions of P. In the case of R, we say that R has a P - no inheritance chain, and no access to the internals of P.

Deja View - the feeling that you've seen this post before.

GeneralRe: OOPs question: whats the difference between these ways of accessing methods !!! Pin
Arindam Tewary8-Mar-07 17:53
professionalArindam Tewary8-Mar-07 17:53 
AnswerRe: OOPs question: whats the difference between these ways of accessing methods !!! Pin
Guffa8-Mar-07 3:56
Guffa8-Mar-07 3:56 
GeneralRe: OOPs question: whats the difference between these ways of accessing methods !!! Pin
Arindam Tewary8-Mar-07 17:56
professionalArindam Tewary8-Mar-07 17:56 
QuestionDateTime format Problem Pin
sks838-Mar-07 2:52
sks838-Mar-07 2:52 
AnswerRe: DateTime format Problem Pin
Colin Angus Mackay8-Mar-07 3:21
Colin Angus Mackay8-Mar-07 3:21 
Questionflash animations on forms [modified] Pin
nadapublicidad8-Mar-07 2:29
nadapublicidad8-Mar-07 2:29 
AnswerRe: flash animations on forms Pin
VirtualVoid.NET8-Mar-07 2:36
VirtualVoid.NET8-Mar-07 2:36 
AnswerRe: flash animations on forms Pin
Russell Jones8-Mar-07 4:19
Russell Jones8-Mar-07 4:19 
QuestionExcel Read/Write Pin
dotnethunk8-Mar-07 2:21
dotnethunk8-Mar-07 2:21 
AnswerRe: Excel Read/Write Pin
N a v a n e e t h8-Mar-07 2:23
N a v a n e e t h8-Mar-07 2:23 
GeneralRe: Excel Read/Write Pin
dotnethunk8-Mar-07 2:39
dotnethunk8-Mar-07 2:39 
QuestionC# interfaces doesn't contain data members Pin
DGtech8-Mar-07 2:17
DGtech8-Mar-07 2:17 
AnswerRe: C# interfaces doesn't contain data members Pin
Pete O'Hanlon8-Mar-07 2:22
mvePete O'Hanlon8-Mar-07 2:22 
AnswerRe: C# interfaces doesn't contain data members Pin
Colin Angus Mackay8-Mar-07 2:22
Colin Angus Mackay8-Mar-07 2:22 
QuestionUrgent: Vista elevating Users Pin
Lucian.Palcu8-Mar-07 0:19
Lucian.Palcu8-Mar-07 0:19 
AnswerRe: Urgent: Vista elevating Users Pin
Pete O'Hanlon8-Mar-07 0:25
mvePete O'Hanlon8-Mar-07 0:25 
AnswerRe: Urgent: Vista elevating Users Pin
Colin Angus Mackay8-Mar-07 2:04
Colin Angus Mackay8-Mar-07 2:04 

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.