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

C#

 
AnswerRe: AD-User must change password at next logon Pin
Ravi Bhavnani28-Jun-10 3:50
professionalRavi Bhavnani28-Jun-10 3:50 
GeneralRe: AD-User must change password at next logon Pin
noamtzu0028-Jun-10 6:51
noamtzu0028-Jun-10 6:51 
GeneralRe: AD-User must change password at next logon Pin
Ravi Bhavnani28-Jun-10 6:58
professionalRavi Bhavnani28-Jun-10 6:58 
GeneralRe: AD-User must change password at next logon Pin
Dave Kreskowiak28-Jun-10 7:35
mveDave Kreskowiak28-Jun-10 7:35 
GeneralRe: AD-User must change password at next logon Pin
noamtzu0028-Jun-10 8:02
noamtzu0028-Jun-10 8:02 
GeneralRe: AD-User must change password at next logon Pin
Dave Kreskowiak28-Jun-10 10:51
mveDave Kreskowiak28-Jun-10 10:51 
GeneralRe: AD-User must change password at next logon Pin
freakyit29-Jun-10 0:16
freakyit29-Jun-10 0:16 
QuestionNewbie Inheritance Question Pin
Rapier-50328-Jun-10 3:18
Rapier-50328-Jun-10 3:18 
In the code below why does the created test object use the variable x from the A class when using medoth PrintString? (As I thought the x in B class would overrided the x in A class even though the A PrintString was being used) How could I make the code use the x variable from the B class? do I have to put a version of the PrintString method in the B class?

Thanks in advance.

Rapier-503

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Test_Inheritance
{
    class Program
    {
        static void Main(string[] args)
        {
            B test = new B();
            test.PrintString();
        }
    }

    class A
    {
        string x = "Hello1";

        public void PrintString()
        {
            Console.WriteLine(x);
        }

    }

    class B:A
    {
        string x = "Hello2";
    }
}

AnswerRe: Newbie Inheritance Question Pin
OriginalGriff28-Jun-10 3:42
mveOriginalGriff28-Jun-10 3:42 
GeneralRe: Newbie Inheritance Question Pin
Rapier-50328-Jun-10 4:54
Rapier-50328-Jun-10 4:54 
GeneralRe: Newbie Inheritance Question Pin
OriginalGriff28-Jun-10 6:05
mveOriginalGriff28-Jun-10 6:05 
GeneralRe: Newbie Inheritance Question Pin
Rapier-50328-Jun-10 7:34
Rapier-50328-Jun-10 7:34 
AnswerRe: Newbie Inheritance Question Pin
Ennis Ray Lynch, Jr.28-Jun-10 3:43
Ennis Ray Lynch, Jr.28-Jun-10 3:43 
GeneralRe: Newbie Inheritance Question Pin
Łukasz Nowakowski28-Jun-10 4:43
Łukasz Nowakowski28-Jun-10 4:43 
GeneralRe: Newbie Inheritance Question Pin
Richard MacCutchan28-Jun-10 4:55
mveRichard MacCutchan28-Jun-10 4:55 
GeneralRe: Newbie Inheritance Question Pin
Łukasz Nowakowski28-Jun-10 4:58
Łukasz Nowakowski28-Jun-10 4:58 
GeneralRe: Newbie Inheritance Question Pin
Ennis Ray Lynch, Jr.28-Jun-10 5:00
Ennis Ray Lynch, Jr.28-Jun-10 5:00 
AnswerRe: Newbie Inheritance Question Pin
PIEBALDconsult28-Jun-10 13:55
mvePIEBALDconsult28-Jun-10 13:55 
QuestionSimilation of UPnP device in C# Pin
Eduard Meciar28-Jun-10 3:18
Eduard Meciar28-Jun-10 3:18 
AnswerRe: Similation of UPnP device in C# Pin
Ravi Bhavnani28-Jun-10 3:53
professionalRavi Bhavnani28-Jun-10 3:53 
QuestionUse of design?? Pin
sujithkumarsl28-Jun-10 2:31
sujithkumarsl28-Jun-10 2:31 
AnswerRe: Use of design?? Pin
PIEBALDconsult28-Jun-10 2:54
mvePIEBALDconsult28-Jun-10 2:54 
GeneralRe: Use of design?? Pin
sujithkumarsl28-Jun-10 2:57
sujithkumarsl28-Jun-10 2:57 
GeneralRe: Use of design?? Pin
PIEBALDconsult28-Jun-10 3:03
mvePIEBALDconsult28-Jun-10 3:03 
AnswerRe: Use of design?? Pin
yu-jian28-Jun-10 4:44
yu-jian28-Jun-10 4:44 

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.