TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
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
Forums
Monthly Leaders
Forum guidelines
Seshadri M
NA
69
17.9k
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