helpstrings

  • Thread starter Thread starter Kimmo Laine
  • Start date Start date
K

Kimmo Laine

Hi,

back in the COM days, i could write something like this, in IDL:

[id(1), helpstring("My Foo function")]
HRESULT Foo();

and later in (e.g.) VBs object browser, my description would apper when i
see the details for Foo.

How can i do that in C#?

[Description("My Foo function")]
public void Foo() {}

This don´t work


thx

Kimmo Laine
 
Hi,

There are actually two flavours of the Description attribute. One is from
the System.ComponentModel namespace and this is most likely the one you've
tried. You can therefore try the other one residing in the
System.EnterpriseServices class.
 
Hi Dmitriy,

i cannot find the EnterpriseServices namespace


Kimmo Laine

Dmitriy Lapshin said:
Hi,

There are actually two flavours of the Description attribute. One is from
the System.ComponentModel namespace and this is most likely the one you've
tried. You can therefore try the other one residing in the
System.EnterpriseServices class.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Kimmo Laine said:
Hi,

back in the COM days, i could write something like this, in IDL:

[id(1), helpstring("My Foo function")]
HRESULT Foo();

and later in (e.g.) VBs object browser, my description would apper when i
see the details for Foo.

How can i do that in C#?

[Description("My Foo function")]
public void Foo() {}

This don´t work


thx

Kimmo Laine
 
Hi Kimmo,

You need to add a reference to System.EnterpriceServices.dll to be able to
use it.

(In Visual Studio .NET, In Solution Explorer, right click on References
and choose add reference. Then double click on System.EnterpriceServices
and Select OK)

Happy coding!
Morten Wennevik [C# MVP]
 
Don?t work - no description in object browser

Kimmo Laine

Dmitriy Lapshin said:
Hi,

There are actually two flavours of the Description attribute. One is from
the System.ComponentModel namespace and this is most likely the one you've
tried. You can therefore try the other one residing in the
System.EnterpriseServices class.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Kimmo Laine said:
Hi,

back in the COM days, i could write something like this, in IDL:

[id(1), helpstring("My Foo function")]
HRESULT Foo();

and later in (e.g.) VBs object browser, my description would apper when i
see the details for Foo.

How can i do that in C#?

[Description("My Foo function")]
public void Foo() {}

This don´t work


thx

Kimmo Laine
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

cast to ref object 4
C# Reflection List<T> 2
Enum question 3
Type question 3
Hiding baseclass members 4
IDictionary to/from Xml 1
operator question 2
MSMQ as timer 1

Back
Top