Will Web 3.0 Replace Web 2.0?
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Seshadri M
2.1k
69
14.4k
Dervied class Constructor value pass to parent class
Sep 18 2017 3:03 AM
I am trying to pass the value from child class to parent class constructor. But
class Class1
{
public Class1(int a, int b) {
this.a = a;
this.b = b;
Console.WriteLine("parentconstructor");
}
}
class Class2: Class1 {
public Class2(int a, int b): base(a, b) {
Console.WriteLine("childconstructor");
}
}
class program
{
class2 obj =new class2( 4,5);
Console.ReadLine();
}
//OUTPUT
//Parentconstructor
//childconstriuctor
// But excepted child constructor first an second parentconstructor
Reply
Answers (
4
)
Extract handwritten part from the Document
How to use web view in tappedlink