I'm studying the concepts of OOP and it gave me a question.
In Java I believe I can access all methods and attributes declared as public in a subclass even when I use a superclass type variable to reference this subclass.
But in C # I can not access subclass methods when I assign your reference to a superclass?
Is there a difference between languages? If so, why, if the concept of POO is theoretically the same for any programming language?
Example:
ContaPoupanca poupanca = new ContaPoupanca();
poupanca.CalculaInvestimento();
Conta conta = new ContaPoupanca();
conta.CalculaInvestimento(); // Não consigo acessar esse método através da variável conta.