Click here to Skip to main content
15,902,198 members
Home / Discussions / C#
   

C#

 
GeneralRe: Offline ActiveX Control for Internet Explorer Pin
NotPolitcallyCorrect4-Mar-13 4:23
NotPolitcallyCorrect4-Mar-13 4:23 
AnswerRe: Offline ActiveX Control for Internet Explorer Pin
Shameel4-Mar-13 4:12
professionalShameel4-Mar-13 4:12 
Questionspeech2text. Pin
depak gupta2-Mar-13 19:23
depak gupta2-Mar-13 19:23 
AnswerRe: speech2text. Pin
Peter_in_27802-Mar-13 19:31
professionalPeter_in_27802-Mar-13 19:31 
AnswerRe: speech2text. Pin
Abhinav S3-Mar-13 4:58
Abhinav S3-Mar-13 4:58 
AnswerRe: speech2text. Pin
Thomas Daniels3-Mar-13 6:08
mentorThomas Daniels3-Mar-13 6:08 
QuestionPartial class: is this a bug? Pin
Septimus Hedgehog2-Mar-13 6:52
Septimus Hedgehog2-Mar-13 6:52 
AnswerRe: Partial class: is this a bug? Pin
DaveyM692-Mar-13 7:56
professionalDaveyM692-Mar-13 7:56 
AnswerRe: Partial class: is this a bug? Pin
Dave Kreskowiak2-Mar-13 8:24
mveDave Kreskowiak2-Mar-13 8:24 
GeneralRe: Partial class: is this a bug? Pin
Septimus Hedgehog2-Mar-13 9:34
Septimus Hedgehog2-Mar-13 9:34 
AnswerRe: Partial class: is this a bug? Pin
Alan N2-Mar-13 11:19
Alan N2-Mar-13 11:19 
GeneralRe: Partial class: is this a bug? Pin
Septimus Hedgehog3-Mar-13 7:49
Septimus Hedgehog3-Mar-13 7:49 
GeneralRe: Partial class: is this a bug? Pin
Septimus Hedgehog6-Mar-13 5:53
Septimus Hedgehog6-Mar-13 5:53 
Questioneven numbers table Pin
Yrtsg1-Mar-13 22:11
Yrtsg1-Mar-13 22:11 
AnswerRe: even numbers table Pin
harold aptroot1-Mar-13 23:29
harold aptroot1-Mar-13 23:29 
QuestionC# Console.ReadLine runns out of memory Pin
dcof1-Mar-13 8:45
dcof1-Mar-13 8:45 
AnswerRe: C# Console.ReadLine runns out of memory Pin
Jibesh1-Mar-13 9:13
professionalJibesh1-Mar-13 9:13 
AnswerRe: C# Console.ReadLine runns out of memory Pin
OriginalGriff1-Mar-13 21:59
mveOriginalGriff1-Mar-13 21:59 
GeneralRe: C# Console.ReadLine runns out of memory Pin
dcof2-Mar-13 8:07
dcof2-Mar-13 8:07 
GeneralRe: C# Console.ReadLine runns out of memory Pin
jschell2-Mar-13 10:26
jschell2-Mar-13 10:26 
GeneralRe: C# Console.ReadLine runns out of memory Pin
dcof2-Mar-13 11:26
dcof2-Mar-13 11:26 
GeneralRe: C# Console.ReadLine runns out of memory Pin
jschell3-Mar-13 5:54
jschell3-Mar-13 5:54 
QuestionTrying to use child class method by overriding parent Pin
MichCl1-Mar-13 8:26
MichCl1-Mar-13 8:26 
AnswerRe: Trying to use child class method by overriding parent Pin
OriginalGriff1-Mar-13 8:41
mveOriginalGriff1-Mar-13 8:41 
I tried it myself, by pasting your code into an app, and adding a few bits to prevent compilation errors:
C#
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?
C#
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
MichCl1-Mar-13 9:30 

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.