ExamVeda
Login
Home
Classes and Objects in C Sharp
?

Which C# statement should be added in function a() of class y to get output "i love csharp"?
class x
{
    public void a()
    {
        console.write("bye");
    }
}
class y : x
{
    public void a()
    {
    /* add statement here */
        console.writeline("  i love csharp ");
    }
}
class program
{
    static void main(string[] args)
    {
        y obj =  new obj();
        obj.a();
    }
}

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.