473,406 Members | 2,220 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,406 software developers and data experts.

Can I use nested class with events?

MWK
Hi All,

I use VS2003 and managed code to compile a DLL.
When I use a nested class, the event always cause an error:

LINK : error LNK2020: unresolved token (06000004)
Test.TestClass::OnEventFired
LINK : fatal error LNK1120: 1 unresolved externals

If I remove the nested class, everything goes fine.
Here is the class structure, can some one please tell me what's wrong with
the code.

namespace Test
{
public __gc class TestClass
{
public:
TestClass()
{ }

public:
__event void OnEventFired(TestClass* sender, String* Data);

///
/// something here to raise the event
///
//hereis the nested class
__gc class NestedClass
{
public:
NestedClass()
{ }
};

};
}

Nov 17 '05 #1
0 816

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

Similar topics

9
by: T. Earle | last post by:
To list, I'm trying to figure out the best approach to the following problem: I have four variables: 1) headlines 2) times 3) states 4) zones
3
by: Leszek | last post by:
Hello, I have the following XML file: <events> <event name="event1"> <sessions> <session date="23 Feb 2004" time="10:00 - 15:00" location="Toronto" /> </sessions> </event>
1
by: AA | last post by:
Hello, somebody know how to raise an event from a nested class?? This is my situation... I have two classes, the class1 with 2 events, and a nested class (class2) inside the class1. So... How can...
6
by: B0nj | last post by:
I've got a class in which I want to implement a property that operates like an indexer, for the various colors associated with the class. For instance, I want to be able to do 'set' operations...
2
by: Marek | last post by:
Hi, I have a Form with many UserControls on it. Some of the UserControls contain other Controls. What is the best way of notifying each of the nested controls about an event that has occured on...
3
by: Carmella | last post by:
Is it possible for a class to create an instance of a private nested class which raises events and then listen for those events? In the example below, when InnerClass sings, OuterClass should say...
2
by: Pietro | last post by:
Hello, somebody know how to raise an event from a nested class? I have two classes, the class1 with 1 events, and a nested class (class2) inside the class1. So... How can I raise class1 events...
6
by: Steve Hershoff | last post by:
Hi everyone, I've got a strange one here. There are two datagrids on my page, one nested within the other. I'll refer to them as the topmost and secondary datagrids. In the topmost...
3
by: puzzlecracker | last post by:
Would you quickly remind me the difference between, regular class, static class, and nested class? Thanks
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.