Answers for "return a parent class object from method in a child class c#"

C#
0

c# create class from parent class

public class ChildClass : ParentClass
{


    public ChildClass(ParentClass ch)
    {
        foreach (var prop in ch.GetType().GetProperties())
        {
            this.GetType().GetProperty(prop.Name).SetValue(this, prop.GetValue(ch, null), null);
        }
    }
}
Posted by: Guest on June-17-2021

Code answers related to "return a parent class object from method in a child class c#"

C# Answers by Framework

Browse Popular Code Answers by Language