In c#, I would like the abstract class to be applied to many other classes. How can I do it without marking each class.
public abstract class Bar
{
public bool Blah { get; set; }
}
public class Foo : Bar
{
public int FooId { get; set; }
}
public class Stool : Bar {}
public class Fun : Bar {}
public class NoFun : Bar {}
etc, etc.
Is there a way to just grab every class and then mark it as inheriting Bar?
No. You could have a visual studio add-in that did this, or some other similar sort of static code manipulation tool, but in terms of the language itself there is no way to modify the inheritance of a type at runtime, and as far as I know of no existing visual studio functionality for doing this for you.