I really need help :(

    Date: 02/13/07 (C Sharp)    Keywords: no keywords

    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!

    Source: http://community.livejournal.com/csharp/81602.html

« getch() in C# || MultiSampleQualityLevel? »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home