I work with code that has an abstract class, for example:
public abstract class AbstractClass
{
...
}
and there are inherited classes from AbstractClass. One object is created depending on the user entering one of the inherited classes. Each inherited class has its own properties:
class classOne : AbstractClass
{
...
public int A { get; set;}
public int B { get; set;}
public int C { get; set;}
...
}
class classTwo : AbstractClass
{
...
public int D { get; set;}
public int E { get; set;}
...
}
... Let's say I want to use functions in this code, and I know what type of object will be returned. How to change the properties of the output object, since the program is written so that the output class is determined only when the program starts?
Saeid source
share