c # referenziert a verwendet b, das von c erbt
Ich habe Klassen A, B, C wie folgt:
//Class A is in Console application that has reference to class library that has class B
public class A
{
public void UseBObject()
{
B BInstance=new B(); // error C is defined in assembly that is not referenced you must add reference that contains C...
}
}
//Class library that reference another library the contains C class
public class B : C
{
public string Name{get;set;}
}
Meine Frage ist, ob B bereits einen Verweis auf C hat und A einen Verweis auf B, warum muss A einen Verweis auf C haben? Das ist nicht sinnvoll, nein?