Click here to Skip to main content
15,900,500 members
Home / Discussions / C#
   

C#

 
Questionforms & files [modified] Pin
jojoba20106-Feb-10 2:31
jojoba20106-Feb-10 2:31 
QuestionMulti dimension Array Not Working [Solved] Pin
Wamuti6-Feb-10 2:07
Wamuti6-Feb-10 2:07 
AnswerRe: Multi dimension Array Not Working Pin
harold aptroot6-Feb-10 2:18
harold aptroot6-Feb-10 2:18 
QuestionProblem with Interface? Pin
mdrizwan_15-Feb-10 23:13
mdrizwan_15-Feb-10 23:13 
AnswerRe: Problem with Interface? Pin
Eddy Vluggen5-Feb-10 23:24
professionalEddy Vluggen5-Feb-10 23:24 
GeneralRe: Problem with Interface? Pin
OriginalGriff5-Feb-10 23:29
mveOriginalGriff5-Feb-10 23:29 
GeneralRe: Problem with Interface? Pin
Eddy Vluggen5-Feb-10 23:38
professionalEddy Vluggen5-Feb-10 23:38 
AnswerRe: Problem with Interface? Pin
OriginalGriff5-Feb-10 23:28
mveOriginalGriff5-Feb-10 23:28 
Ignoring the various errors in your code, the derived class Display will be called. To access the base clase method, use "base.Display()".
        Derived Dobj = new Derived();
        Dobj.Display();
public interface Iface
    {
    void Display();
    }

public class Base
    {
    public void Display()
        {
        Console.WriteLine("This is Base Class Method");
        }
    }

public class Derived : Base, Iface
    {
    public void Display()
        {
        base.Display();
        Console.WriteLine("This is Interface Method");
        }
    }
I think you need to read up on Interfaces: there is no code associated with an "interface method". The method you define in the Derived class implements the Interface method requirements, but masks the Base class implemenation - you will in fact can an error message to that effect that can only be got rid off by declaring it as "public new void Display()"
If Barbie is so popular, why do you have to buy her friends?

Eagles may soar, but weasels don't get sucked into jet engines.

If at first you don't succeed, destroy all evidence that you tried.

AnswerRe: Problem with Interface? Pin
Md. Marufuzzaman6-Feb-10 0:14
professionalMd. Marufuzzaman6-Feb-10 0:14 
AnswerRe: Problem with Interface? Pin
Luc Pattyn6-Feb-10 1:49
sitebuilderLuc Pattyn6-Feb-10 1:49 
AnswerRe: Problem with Interface? Pin
#realJSOP6-Feb-10 2:03
professional#realJSOP6-Feb-10 2:03 
Questionc# Pin
bahar35-Feb-10 23:07
bahar35-Feb-10 23:07 
QuestionRe: c# Pin
Eddy Vluggen5-Feb-10 23:17
professionalEddy Vluggen5-Feb-10 23:17 
AnswerRe: c# Pin
OriginalGriff5-Feb-10 23:32
mveOriginalGriff5-Feb-10 23:32 
AnswerRe: c# Pin
mdrizwan_15-Feb-10 23:33
mdrizwan_15-Feb-10 23:33 
AnswerRe: c# Pin
Mycroft Holmes6-Feb-10 0:06
professionalMycroft Holmes6-Feb-10 0:06 
AnswerRe: c# Pin
Md. Marufuzzaman6-Feb-10 0:33
professionalMd. Marufuzzaman6-Feb-10 0:33 
AnswerRe: c# Pin
#realJSOP6-Feb-10 2:03
professional#realJSOP6-Feb-10 2:03 
AnswerRe: c# Pin
Brij6-Feb-10 7:16
mentorBrij6-Feb-10 7:16 
Questionfunction c# Pin
bahar35-Feb-10 23:05
bahar35-Feb-10 23:05 
AnswerRe: function c# Pin
OriginalGriff5-Feb-10 23:16
mveOriginalGriff5-Feb-10 23:16 
AnswerRe: function c# Pin
Md. Marufuzzaman6-Feb-10 0:38
professionalMd. Marufuzzaman6-Feb-10 0:38 
AnswerRe: function c# Pin
Luc Pattyn6-Feb-10 1:51
sitebuilderLuc Pattyn6-Feb-10 1:51 
AnswerRe: function c# Pin
loyal ginger6-Feb-10 2:52
loyal ginger6-Feb-10 2:52 
GeneralRe: function c# Pin
OriginalGriff6-Feb-10 3:47
mveOriginalGriff6-Feb-10 3:47 

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.