public class base { public base() { } public base(GlobalParameters global) { global = (GlobalParameters )Activator.CreateInstance(typeof(GlobalParameters )); } } //here is my GlobalParameters class public class GlobalParameters() { public string name {get; set;} public int age {get; set;) } //here is the child class where I want to call the overloaded constructor and use the properties I have in my "GlobalParameters" class public void ChildClass : Base { //how to call the overload Base constructor and use the global parameter to access those class properties like name and age }
public base(GlobalParameters global) : this() { global = (GlobalParameters )Activator.CreateInstance(typeof(GlobalParameters )); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)