Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Visual C++ properties (Teaching an old dog old tricks)...

Visual C++ properties (Teaching an old dog old tricks)...

Scheduled Pinned Locked Moved C / C++ / MFC
c++csharpquestionlearning
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bob16972
    wrote on last edited by
    #1

    Correct me if I'm wrong, but Visual C++ seems to have gotten properties right (this native Visual C++, non-standard attribute)... __declspec( property( get=get_func_name, put=put_func_name ) ) declarator I'm embarassed to say that they've had this for a long time and I'm only now messing with it (yes, I realize there are articles that talk about it here but I had never truly wanted to use this until just recently), but their approach to properties for native Visual C++ development allows the property to be used like a member (assuming proper implementation of the accessor and mutator of course) whereas the C# implementation has the restriction "A property or indexer may not be passed as an out or ref variable". So far it seems to work intuitively (and can do things C# properties can't :cool:), but... Does anyone know of any serious negative aspects to using it besides that it's not standard? Am I missing some caveat?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups