Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 487211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:34:54+00:00 2026-05-13T01:34:54+00:00

Every .net developer knows about the concept of properties. A rough 99.99%, it’s just

  • 0

Every .net developer knows about the concept of properties. A rough 99.99%, it’s just a piece of metadata gluing together two methods, a getter, and a setter.

Same thing usually goes for events, with their add, remove, and invoke method.

The ECMA-335 describes a «Other» kind of method semantic, that would apply to either a property or an event. Conceptually, a property or an event could have a multiple number of «other» methods.

Today’s the first day I stumbled upon a property with an «other» method. And of course it had to be related to COM. The interface EnvDTE.Property, in the EnvDTE assembly (used to write addins to Visual Studio), contains a property defined as follows:

.property object Value()
{
  .custom instance void [mscorlib]System.Runtime.InteropServices.DispIdAttribute::.ctor(int32) = ( 01 00 00 00 00 00 00 00 ) 
  .get instance object EnvDTE.Property::get_Value()
  .other instance void EnvDTE.Property::let_Value(object)
  .set instance void EnvDTE.Property::set_Value(object)
}

With let_Value being defined as:

.method public hidebysig newslot specialname abstract virtual 
        instance void  let_Value([in] object  marshal( struct) lppvReturn) runtime managed internalcall
{
  .custom instance void [mscorlib]System.Runtime.InteropServices.DispIdAttribute::.ctor(int32) = ( 01 00 00 00 00 00 00 00 ) 
}

Apparently, VBScript and versions of VB before VB.NET can define properties using a Let keyword. And the Let has a same signature as the Set. I sense that there’s a relationship here.

But does anyone know how this property have been declared in the language that EnvDTE has been written with? How could I create an assembly with the same pattern (without using ilasm, that would be too easy)? And does anyone have faced a similar property?

And does anyone have seen other «other» properties, with maybe a different semantic than this one? And if yes, what are they used to?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T01:34:54+00:00Added an answer on May 13, 2026 at 1:34 am

    It’s a COM thing which is surfaced in VB. Set assigns a reference to replace a property’s referred-to item, whereas Let is expected to copy the content of the operand into the existing property. (See also Property Get).

    IIRC this is not a core COM thing, more something that’s used where a language doesnt have sufficient expressive power to deal with value vs reference issues to a sufficiently precise degree – I believe it may only apply when you’re using IDispatch (where you”re addressing by property id rather than method) rather than a custom interface (where you always have to resolve to a method and call that). I’m pretty sure VB.NET (or other .NET languages) doesnt surface such things and hence they’re a rare thing.

    Essential COM by Box doesnt mention it (only propget and propput for get and set). COM IDL & Interface Design by Dr Al Major mentions it on P106 ans says:

    dispinterface DMyInterface { methods:
    ...
    [id(3), propputref] void lMyProp([in] IDispatch *pDisp);
    }
    

    The propputref attribute is an odd little thing that has its origins in the idiosynracies of Visual Basic syntax. Consider the following:

    Dim val as DMyOtherInterface
    Dim var as DMyInterface
    
    Set var.lMyProp = val
    var.lMyProp = val
    

    The two assignments are both permissible but mean completely different things. The use of the Set keyword in the first assginment indicates that lMyProp is being assigned an interface […]. The second assignment is a simpe one, where the value of the val object, which is the value of the default member of the DMyOtherInterface interface (the default member is the member tagged by the DISPID_VALUE ID, as will be explained shortly), is being assigned to the lMyProp property of the DMyInterface interface.

    The first assignment is carried out using the propputref method associated with the lMyProp property, while the second assignment uses the propput method. In order for this to work, both the propputref and propput methods must be defined. If you’re confused by this way of doing things, you’re not alone. While VB has many good features that have fundamentally changed the nature of programming, the definition of the language was predominantly market-driven rather than being designed, and sometimes it shows.

    Amusingly I havent ever used the Major book since reading it in early 2000 before the COM and .COM bust (Its a good book for its purpose though). Thanks for the trip down memory lane – I love the way people tell us that programming keeps getting harder!

    Dont have the Lidin book with me to see if it mentions .other but I’m sure you do (BTW thanks a lot for Mono.Cecil)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.