473,385 Members | 1,907 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,385 software developers and data experts.

How to specify both <EventClass> and <Guid> Attributes on a class

What is the syntax for declaring both <EventClass> and <Guid> attributes on
a class? The following causes an error in the class declaration:

Imports System.Runtime.InteropServices
Imports System.EnterpriseServices

<Guid("0EA77155-29EA-4f1b-870C-B6D7287E65EC")> _
Public Interface IMyEventClass

End Interface

' Below is the problem:

<EventClass()> _
<Guid("E07B09A3-15C6-400a-BD7E-FDAFEF78BC2C")> _
Public Class MyEventClass
Inherits ServicedComponent
Implements IMyEventClass
End Class
Thanks in advance,

Mike
May 25 '06 #1
3 1051
Nevermind, I found the answer:

<EventClass(), _
Guid(".....")> _
Public Class ...

End Class
"MikeL" <mi***@slomins.com> wrote in message
news:ug**************@TK2MSFTNGP04.phx.gbl...
What is the syntax for declaring both <EventClass> and <Guid> attributes
on a class? The following causes an error in the class declaration:

Imports System.Runtime.InteropServices
Imports System.EnterpriseServices

<Guid("0EA77155-29EA-4f1b-870C-B6D7287E65EC")> _
Public Interface IMyEventClass

End Interface

' Below is the problem:

<EventClass()> _
<Guid("E07B09A3-15C6-400a-BD7E-FDAFEF78BC2C")> _
Public Class MyEventClass
Inherits ServicedComponent
Implements IMyEventClass
End Class
Thanks in advance,

Mike

May 25 '06 #2
"MikeL" <mi***@slomins.com> schrieb:
Nevermind, I found the answer:


Note that the code shown in your original post will compile in VB 2005.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
May 25 '06 #3
Thanks for the tip, Harfried.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ux**************@TK2MSFTNGP05.phx.gbl...
"MikeL" <mi***@slomins.com> schrieb:
Nevermind, I found the answer:


Note that the code shown in your original post will compile in VB 2005.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

May 26 '06 #4

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

Similar topics

5
by: Laszlo Zsolt Nagy | last post by:
Hughes, Chad O wrote: > Is there any way to create a class method? I can create a class > variable like this: > Hmm, seeing this post, I have decided to implement a 'classproperty'...
2
by: Pohihihi | last post by:
In what condition attributes (class) might have static methods?
2
by: Pohihihi | last post by:
Actually I am not understanding what you mean by > attribute will not be applicable to the type, but rather, all types you mean it will behave like ?? Thanks, Po
7
by: localhost | last post by:
What is the best and/or fastest way to enumerate attributes of an HTML control? In my page template, I have: <body id="myBody" bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0"...
1
by: Dave | last post by:
I have a hyperlink column in a datagrid as follows <asp:HyperLinkColumn DataNavigateUrlField="OrderId" DataNavigateUrlFormatString="OrderDetails.aspx?Id={0}" DataTextField="Order"...
2
by: Alfred Salton | last post by:
Can anyone show me how to set the css class of an HtmlTable control in code on the server? I can't find any indication that the css class is a property of the HtmlTable, HtmlTableRow and...
2
by: Angelos Karantzalis | last post by:
Hi y'all, we're using a bunch of classes in a project, that we wanted to convert to-from xml easily. So, we defined XmlAttribute annotations for our class members and all worked fine. The Xml...
11
by: Frederic Rentsch | last post by:
Hi all, If I derive a class from another one because I need a few extra features, is there a way to promote the base class to the derived one without having to make copies of all attributes? ...
3
by: tskelly | last post by:
Hi, Is there any way of specifying a pair of attributes that are both optional but if one is present the other must also be? Thanks in advance.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.