Results 1 to 4 of 4

Thread: MustOverride in C#?

  1. #1

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

    MustOverride in C#?

    well I guess I cant ask these in the C# section since you have to know VB to answer me

    I think the equivalent keyword for MustOverride is "abstract", correct?
    Now I want to have a MustOverride ReadOnly Property. I can't figure out how to declare that...

    also what does "virtual" do?
    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
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    Never did a property before but you should be able to do it, since it is really just compiled into a method anyway.

    Try:
    VB Code:
    1. Public MustOverride ReadOnly Property test() As Boolean

    That's it. HTH.

  3. #3
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  4. #4
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256

    Re: MustOverride in C#?

    Originally posted by MrPolite
    well I guess I cant ask these in the C# section since you have to know VB to answer me

    I think the equivalent keyword for MustOverride is "abstract", correct?
    Now I want to have a MustOverride ReadOnly Property. I can't figure out how to declare that...

    also what does "virtual" do?
    Virtual makes the property or method overridable.

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