473,396 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

helpstrings

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
Nov 16 '05 #1
4 1396
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" <reply.to@newsgroup> wrote in message
news:eh*************@TK2MSFTNGP10.phx.gbl...
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


Nov 16 '05 #2
Hi Dmitriy,

i cannot find the EnterpriseServices namespace
Kimmo Laine

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:uJ**************@TK2MSFTNGP12.phx.gbl...
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" <reply.to@newsgroup> wrote in message
news:eh*************@TK2MSFTNGP10.phx.gbl...
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

Nov 16 '05 #3
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]
Nov 16 '05 #4
Don?t work - no description in object browser

Kimmo Laine

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:uJ**************@TK2MSFTNGP12.phx.gbl...
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" <reply.to@newsgroup> wrote in message
news:eh*************@TK2MSFTNGP10.phx.gbl...
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

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: None | last post by:
I'm trying to mark up an enum in a .h file such that when it is emitted to the .idl file the elements of the enum can be marked up with helpstring attributes. Microsoft has a published sample...
4
by: m_schellens | last post by:
I want to sort dome output from a routine which writes to an ostream. Following is what I am doing now and it works, but it looks overyly complicated to me. I assume that there is an easier way...
2
by: TCook | last post by:
Hey All, I have added my XML comments to my VB.Net solution and from within VS2005 they show up quite nicely in the Object Browser, etc. However, when the class library is referenced from a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.