Click here to Skip to main content
11,645,087 members (70,727 online)
   

C#

 
QuestionAssistence required with this spacific Program Pin
Cihangir Giray Han4-Oct-12 22:01
memberCihangir Giray Han4-Oct-12 22:01 
AnswerRe: Assistence required with this spacific Program Pin
Richard MacCutchan4-Oct-12 23:04
mvpRichard MacCutchan4-Oct-12 23:04 
AnswerRe: Assistence required with this spacific Program Pin
V.5-Oct-12 0:41
memberV.5-Oct-12 0:41 
QuestionHow to configure post-build events for setup/deployment projects in Visual Studio Pin
Tridip Bhattacharjee4-Oct-12 21:25
memberTridip Bhattacharjee4-Oct-12 21:25 
AnswerRe: How to configure post-build events for setup/deployment projects in Visual Studio Pin
Richard MacCutchan4-Oct-12 21:50
mvpRichard MacCutchan4-Oct-12 21:50 
GeneralRe: How to configure post-build events for setup/deployment projects in Visual Studio Pin
Tridip Bhattacharjee6-Oct-12 7:07
memberTridip Bhattacharjee6-Oct-12 7:07 
GeneralRe: How to configure post-build events for setup/deployment projects in Visual Studio Pin
Richard MacCutchan6-Oct-12 7:18
mvpRichard MacCutchan6-Oct-12 7:18 
QuestionBasic Polymorphism Problem Pin
AmbiguousName4-Oct-12 18:54
memberAmbiguousName4-Oct-12 18:54 
AnswerRe: Basic Polymorphism Problem Pin
DaveyM694-Oct-12 20:29
mentorDaveyM694-Oct-12 20:29 
AnswerRe: Basic Polymorphism Problem Pin
AmbiguousName4-Oct-12 20:56
memberAmbiguousName4-Oct-12 20:56 
GeneralRe: Basic Polymorphism Problem Pin
DaveyM694-Oct-12 21:35
mentorDaveyM694-Oct-12 21:35 
AnswerRe: Basic Polymorphism Problem Pin
AmbiguousName4-Oct-12 21:45
memberAmbiguousName4-Oct-12 21:45 
GeneralRe: Basic Polymorphism Problem Pin
DaveyM694-Oct-12 22:18
mentorDaveyM694-Oct-12 22:18 
AnswerRe: Basic Polymorphism Problem Pin
BobJanova5-Oct-12 0:52
memberBobJanova5-Oct-12 0:52 
What are you expecting?

using System;
 
public class BaseLayer1
{
  public virtual void Function()
  { Console.WriteLine("BL1"); }
}
 
public class ChildLayer1 : BaseLayer1
{
  
  BaseLayer2 base2 = new BaseLayer2();
 
  public override void Function()
  {
    Console.WriteLine("CL1"); 
    base2.Function(); // Reaches Here. should go to base class in layer2 as well.
  }
}
 
public class BaseLayer2
{
  public virtual void Function()
  {Console.WriteLine("BL2");}
}
 
public class Child1Layer2 : BaseLayer2		         // Child of BaseLayer2
{
  public override void Function()
  {Console.WriteLine("C1L2");}
}
 
public class Child2Layer2 : Child1Layer2		// Child of Child1Layer2
{
  public override void Function()
  {Console.WriteLine("C2L2");}
}
 
class Starter {
 public static void Main(){
  new ChildLayer1().Function();
 }
}

Run this: you get
CL1
BL2
What do you think it should be? That is what you are calling: ChildLayer1 which calls BaseLayer2.
GeneralRe: Basic Polymorphism Problem Pin
DaveyM695-Oct-12 1:19
mentorDaveyM695-Oct-12 1:19 
GeneralRe: Basic Polymorphism Problem Pin
BobJanova5-Oct-12 3:04
memberBobJanova5-Oct-12 3:04 
QuestionC# linq group by Pin
rachel_m4-Oct-12 17:43
memberrachel_m4-Oct-12 17:43 
AnswerRe: C# linq group by Pin
OriginalGriff4-Oct-12 23:19
mvpOriginalGriff4-Oct-12 23:19 
GeneralRe: C# linq group by Pin
rachel_m5-Oct-12 2:48
memberrachel_m5-Oct-12 2:48 
GeneralRe: C# linq group by Pin
OriginalGriff5-Oct-12 3:29
mvpOriginalGriff5-Oct-12 3:29 
QuestionCrystal Reports : Database Login Prompt Issue Pin
Quam Chang4-Oct-12 16:36
memberQuam Chang4-Oct-12 16:36 
AnswerRe: Crystal Reports : Database Login Prompt Issue Pin
AmbiguousName4-Oct-12 20:00
memberAmbiguousName4-Oct-12 20:00 
QuestionAggregate data into 5 min interval Pin
Member 94707244-Oct-12 11:59
memberMember 94707244-Oct-12 11:59 
QuestionC# linq Pin
rachel_m4-Oct-12 9:36
memberrachel_m4-Oct-12 9:36 
AnswerRe: C# linq Pin
Collin Jasnoch4-Oct-12 10:00
memberCollin Jasnoch4-Oct-12 10:00 
Question.exe Reference Problem - maybe Pin
dirsow4-Oct-12 7:52
memberdirsow4-Oct-12 7:52 
AnswerRe: .exe Reference Problem - maybe Pin
Eddy Vluggen4-Oct-12 9:01
memberEddy Vluggen4-Oct-12 9:01 
GeneralRe: .exe Reference Problem - maybe Pin
dirsow4-Oct-12 9:27
memberdirsow4-Oct-12 9:27 
GeneralRe: .exe Reference Problem - maybe Pin
Eddy Vluggen4-Oct-12 9:34
memberEddy Vluggen4-Oct-12 9:34 
GeneralRe: .exe Reference Problem - maybe Pin
dirsow4-Oct-12 9:41
memberdirsow4-Oct-12 9:41 
AnswerRe: .exe Reference Problem - maybe Pin
Bernhard Hiller4-Oct-12 21:00
memberBernhard Hiller4-Oct-12 21:00 
Questionhow to setting Four tier application in my application? Pin
somasundarapandian4-Oct-12 4:28
membersomasundarapandian4-Oct-12 4:28 
AnswerRe: how to setting Four tier application in my application? Pin
Dave Kreskowiak4-Oct-12 6:45
mvpDave Kreskowiak4-Oct-12 6:45 
QuestionRe: how to setting Four tier application in my application? Pin
Eddy Vluggen4-Oct-12 9:02
memberEddy Vluggen4-Oct-12 9:02 
AnswerRe: how to setting Four tier application in my application? Pin
OriginalGriff4-Oct-12 9:34
mvpOriginalGriff4-Oct-12 9:34 
Questionsqldatabaseconnectivity Pin
Member 94545634-Oct-12 4:05
memberMember 94545634-Oct-12 4:05 
AnswerRe: sqldatabaseconnectivity Pin
Ravi Bhavnani4-Oct-12 4:31
memberRavi Bhavnani4-Oct-12 4:31 
AnswerRe: sqldatabaseconnectivity Pin
Richard MacCutchan4-Oct-12 4:32
mvpRichard MacCutchan4-Oct-12 4:32 
AnswerRe: sqldatabaseconnectivity Pin
palakshamb4-Oct-12 23:28
memberpalakshamb4-Oct-12 23:28 
QuestionCan an Attribute class find out, to which class it is actually attached? Pin
Andy4114-Oct-12 2:42
memberAndy4114-Oct-12 2:42 
AnswerRe: Can an Attribute class find out, to which class it is actually attached? Pin
Dave Kreskowiak4-Oct-12 6:56
mvpDave Kreskowiak4-Oct-12 6:56 
GeneralRe: Can an Attribute class find out, to which class it is actually attached? Pin
Andy4114-Oct-12 20:05
memberAndy4114-Oct-12 20:05 
AnswerRe: Can an Attribute class find out, to which class it is actually attached? Pin
BobJanova5-Oct-12 1:15
memberBobJanova5-Oct-12 1:15 
GeneralRe: Can an Attribute class find out, to which class it is actually attached? Pin
Andy4116-Oct-12 2:25
memberAndy4116-Oct-12 2:25 
QuestionReturning Object From HashTable Pin
AmbiguousName4-Oct-12 1:10
memberAmbiguousName4-Oct-12 1:10 
AnswerRe: Returning Object From HashTable Pin
Smart Arab4-Oct-12 1:54
memberSmart Arab4-Oct-12 1:54 
AnswerRe: Returning Object From HashTable Pin
Member 94836444-Oct-12 1:59
memberMember 94836444-Oct-12 1:59 
AnswerRe: Returning Object From HashTable Pin
Manfred R. Bihy4-Oct-12 2:22
mvpManfred R. Bihy4-Oct-12 2:22 
AnswerRe: Returning Object From HashTable Pin
Bernhard Hiller4-Oct-12 21:05
memberBernhard Hiller4-Oct-12 21:05 
Questionbusiness process management Pin
sag4prog4-Oct-12 1:04
membersag4prog4-Oct-12 1:04 

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

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


Advertise | Privacy | Mobile
Web02 | 2.8.150731.1 | Last Updated 3 Aug 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid