Results 1 to 2 of 2

Thread: overriding an abstract property?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    overriding an abstract property?

    I'm inheriting from a class that has an abstract property
    the property has a get and set field. I'm wondering if there is a way to override it so that I would only need to implement the get field (ie, make it a readonly property)
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724

    Re: overriding an abstract property?

    Nope, 'fraid not - you can provide an empty implementation however:
    Code:
    protected override string PropertyName
    {
        get
        {
            return _someVariable;
        }
        set
        {
            // No implementation.
        }
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width