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 207301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:43:24+00:00 2026-05-11T17:43:24+00:00

Is it true that you cannot use COM Interop to expose COM properties? Everything

  • 0

Is it true that you cannot use COM Interop to expose COM properties? Everything has to be a method?

If this is not true, how do you do it?

  • 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-11T17:43:24+00:00Added an answer on May 11, 2026 at 5:43 pm

    Not true.

    I understand your question to be asking about COM calling or using a .NET class.

    According to this page, you can expose methods, properties and fields of managed classes to COM consumers.

    All managed types, methods, properties, fields, and events that you want to expose to COM must be public. Types must have a public default constructor, which is the only constructor that can be invoked through COM.

    Does this work for you?:

    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    [Guid("A1209192-723B-4325-8599-FB39D9F202D9")]
    public interface ITicklee
    {
        [DispId(1)]
        void TickleMe();
    
        [DispId(2)]
        int Count{get;}
    }
    
    
    [Guid("45715A3B-CA95-49f7-9889-A0022B31EF8A")]
    public class Elmo : ITicklee
    {
        // default ctor
        public Elmo () {}
    
        private int _tickleCount;
    
        public int Count
        {
            get
            {
                return _tickleCount;
            }
        }
    
        public void TickleMe()
        {
            _tickleCount++;
        }
    }
    

    A VBScript test client might look like this:

    Sub TestTickle()  
    
        WScript.echo("")
    
        WScript.echo("Instantiating an Elmo ...")
        dim elmo
        set elmo = WScript.CreateObject("Ionic.Tests.Com.Elmo")
    
        WScript.echo("Tickling...")
    
        For i = 1 to 5
          elmo.TickleMe()
        Next  
    
        WScript.echo("")
        c = elmo.Count
    
        WScript.echo("Tickle Count = " & c)
    
        ' one for the road'
        elmo.TickleMe()
    
    End Sub
    
    call TestTickle()     ' ahem '
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 114k
  • Answers 114k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer How about adding the following to the home page on… May 11, 2026 at 10:16 pm
  • Editorial Team
    Editorial Team added an answer I like to create a nice element-creation interface; something like… May 11, 2026 at 10:16 pm
  • Editorial Team
    Editorial Team added an answer It should work as long as you have the script… May 11, 2026 at 10:16 pm

Related Questions

I have looked around on the Internet trying to answer this question. It seems
I'm using an ObjectDataSource to bind data to a GridView; it works fine except
I have been tasked with finding out what is causing an issue with this
We've been debugging this JBoss server problem for quite a while. After about 10
I wrote a small application to use as a sandbox for testing ideas that

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.