C# Developers' Journal (original) (raw)

I really need help :( Okay..

I have 3 files:
tank.cs, fish.cs and yellowtail.cs

yellowtail is derived from the abstract class fish, tank is the 'container' for yellowtail.

fish contains a constant int:
const int HEIGHT = 30;

fish contains a get/set property for HEIGHT:
public int Height
{
get { return HEIGHT; }
set { Height = value; }
}

yellowtail overrides the constant int from fish:
const int HEIGHT = 50;

What I want to do is to be able to go into the tank class and call something like yellowtail.Height and have it bring that value of 50 with it.

Thank You!