Click here to Skip to main content
12,450,347 members (45,306 online)
   

C#

 
AnswerRe: Partial class: is this a bug? Pin
Alan N2-Mar-13 11:19
memberAlan N2-Mar-13 11:19 
GeneralRe: Partial class: is this a bug? Pin
PHS2413-Mar-13 7:49
memberPHS2413-Mar-13 7:49 
GeneralRe: Partial class: is this a bug? Pin
PHS2416-Mar-13 5:53
memberPHS2416-Mar-13 5:53 
Questioneven numbers table Pin
Yrtsg1-Mar-13 22:11
memberYrtsg1-Mar-13 22:11 
AnswerRe: even numbers table PinPopular
harold aptroot1-Mar-13 23:29
memberharold aptroot1-Mar-13 23:29 
QuestionC# Console.ReadLine runns out of memory Pin
dcof1-Mar-13 8:45
memberdcof1-Mar-13 8:45 
AnswerRe: C# Console.ReadLine runns out of memory Pin
Jibesh1-Mar-13 9:13
memberJibesh1-Mar-13 9:13 
AnswerRe: C# Console.ReadLine runns out of memory Pin
OriginalGriff1-Mar-13 21:59
mvpOriginalGriff1-Mar-13 21:59 
GeneralRe: C# Console.ReadLine runns out of memory Pin
dcof2-Mar-13 8:07
memberdcof2-Mar-13 8:07 
GeneralRe: C# Console.ReadLine runns out of memory Pin
jschell2-Mar-13 10:26
memberjschell2-Mar-13 10:26 
GeneralRe: C# Console.ReadLine runns out of memory Pin
dcof2-Mar-13 11:26
memberdcof2-Mar-13 11:26 
GeneralRe: C# Console.ReadLine runns out of memory Pin
jschell3-Mar-13 5:54
memberjschell3-Mar-13 5:54 
QuestionTrying to use child class method by overriding parent Pin
MichCl1-Mar-13 8:26
memberMichCl1-Mar-13 8:26 
AnswerRe: Trying to use child class method by overriding parent Pin
OriginalGriff1-Mar-13 8:41
mvpOriginalGriff1-Mar-13 8:41 
I tried it myself, by pasting your code into an app, and adding a few bits to prevent compilation errors:
private void button2_Click(object sender, EventArgs e)
     {
     PC pc = new PC();
     int i = 4;
     pc.ValidateDynData(null, ref i);
     }
 
 public partial class PC : GenericPC
     {
     public override void ValidateDynData(TextBox[] tb_dynData_Array, ref int result)
         {
         Console.WriteLine("Ko PC::ValidateDynData");
         }
     }
 

 public class GenericPC
     {
     TextBox[] itsEnteredDynData;
     int returnCode;
     private int processDynData()
         {
         ValidateDynData(itsEnteredDynData, ref returnCode); //start here
         return returnCode;
         }
 
     public virtual void ValidateDynData(TextBox[] tb_dynData_Array, ref int result)
         {
         Console.WriteLine("Generic::ValidateDynData passing off to child to validate special data");
         }
     }
Ignoring the "not assigned" warning message, when I press the button I get:
Ko PC::ValidateDynData
Which is what I would expect - the overloaded version.

Could it be that you are using an instance declared as the base class, rather than the derived?
GenericPC gpc = new GenericPC();
gpc.ValidateDynData(null, ref i);
would give you
Generic::ValidateDynData passing off to child to validate special data
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
MichCl1-Mar-13 9:30
memberMichCl1-Mar-13 9:30 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
jschell2-Mar-13 10:30
memberjschell2-Mar-13 10:30 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
MichCl5-Mar-13 2:23
memberMichCl5-Mar-13 2:23 
GeneralRe: Trying to use child class method by overriding parent; using Reflection to invoke class etc Pin
MichCl5-Mar-13 9:40
memberMichCl5-Mar-13 9:40 
QuestionPassing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 5:42
memberJimmyRopes1-Mar-13 5:42 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
harold aptroot1-Mar-13 7:13
memberharold aptroot1-Mar-13 7:13 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 7:39
memberJimmyRopes1-Mar-13 7:39 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
harold aptroot1-Mar-13 7:50
memberharold aptroot1-Mar-13 7:50 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 12:50
memberJimmyRopes1-Mar-13 12:50 
AnswerRe: Passing parameters from unmanaged code to managed code by reference Pin
Eddy Vluggen1-Mar-13 8:31
mvpEddy Vluggen1-Mar-13 8:31 
GeneralRe: Passing parameters from unmanaged code to managed code by reference Pin
JimmyRopes1-Mar-13 14:15
memberJimmyRopes1-Mar-13 14:15 
Questionrecord mouse coordinates when mouse is clicked on inkcanvas Pin
Naman20071-Mar-13 4:59
memberNaman20071-Mar-13 4:59 
AnswerRe: record mouse coordinates when mouse is clicked on inkcanvas Pin
Simon_Whale1-Mar-13 5:30
memberSimon_Whale1-Mar-13 5:30 
GeneralRe: record mouse coordinates when mouse is clicked on inkcanvas Pin
Naman20071-Mar-13 5:35
memberNaman20071-Mar-13 5:35 
GeneralRe: record mouse coordinates when mouse is clicked on inkcanvas Pin
Simon_Whale1-Mar-13 5:38
memberSimon_Whale1-Mar-13 5:38 
QuestionDotSpatial.Positioning.NmeaInterpreter Pin
loctrice1-Mar-13 3:01
memberloctrice1-Mar-13 3:01 
AnswerRe: DotSpatial.Positioning.NmeaInterpreter Pin
Eddy Vluggen1-Mar-13 4:57
mvpEddy Vluggen1-Mar-13 4:57 
GeneralRe: DotSpatial.Positioning.NmeaInterpreter Pin
loctrice1-Mar-13 5:04
memberloctrice1-Mar-13 5:04 
GeneralRe: DotSpatial.Positioning.NmeaInterpreter Pin
Eddy Vluggen1-Mar-13 5:10
mvpEddy Vluggen1-Mar-13 5:10 
Questionsdk Pin
RAJESHSELVARAJ28-Feb-13 23:04
memberRAJESHSELVARAJ28-Feb-13 23:04 
AnswerRe: sdk Pin
Pete O'Hanlon28-Feb-13 23:24
protectorPete O'Hanlon28-Feb-13 23:24 
AnswerRe: sdk Pin
Dave Kreskowiak1-Mar-13 2:21
mvpDave Kreskowiak1-Mar-13 2:21 
QuestionIssue using the StreamWritter Class Pin
TwiztedFreek28-Feb-13 13:16
memberTwiztedFreek28-Feb-13 13:16 
AnswerRe: Issue using the StreamWritter Class Pin
TwiztedFreek28-Feb-13 13:18
memberTwiztedFreek28-Feb-13 13:18 
AnswerRe: Issue using the StreamWritter Class Pin
Garth J Lancaster28-Feb-13 14:08
memberGarth J Lancaster28-Feb-13 14:08 
AnswerRe: Issue using the StreamWritter Class Pin
Jegan Thiyagesan28-Feb-13 23:33
memberJegan Thiyagesan28-Feb-13 23:33 
AnswerRe: Issue using the StreamWritter Class Pin
Keith Barrow1-Mar-13 1:06
mentorKeith Barrow1-Mar-13 1:06 
AnswerRe: Issue using the StreamWritter Class Pin
Defens931-Mar-13 9:35
memberDefens931-Mar-13 9:35 
QuestionCopy username from text file to website Pin
Muhammad Sayyam28-Feb-13 2:17
memberMuhammad Sayyam28-Feb-13 2:17 
AnswerRe: Copy username from text file to website Pin
DaveyM6928-Feb-13 3:07
mentorDaveyM6928-Feb-13 3:07 
GeneralRe: Copy username from text file to website Pin
Richard MacCutchan28-Feb-13 3:23
mvpRichard MacCutchan28-Feb-13 3:23 
GeneralRe: Copy username from text file to website Pin
DaveyM6928-Feb-13 10:30
mentorDaveyM6928-Feb-13 10:30 
GeneralRe: Copy username from text file to website Pin
Muhammad Sayyam2-Mar-13 20:19
memberMuhammad Sayyam2-Mar-13 20:19 
GeneralRe: Copy username from text file to website Pin
DaveyM695-Mar-13 3:08
mentorDaveyM695-Mar-13 3:08 
GeneralRe: Copy username from text file to website Pin
DaveyM697-Mar-13 21:51
mentorDaveyM697-Mar-13 21:51 
Questiontooth numbers Pin
Jassim Rahma28-Feb-13 0:35
memberJassim Rahma28-Feb-13 0:35 

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.


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