Hello!
I'm reading in a book and they use definition sometimes and declaration
sometimes.
I just want to use the correct terminologi when I talk about these kind of
things.
Below is an example from a book.
The two rows that begin with public delegate void...
and
public event MoveRequest ...
what is each one according to you. Is it a definition or declaration?
class GameController
{
public delegate void MoveRequest(obj ect sender, MoveRequestEven tArgs e);
public event MoveRequest OnMoveRequest;
.... ... ...
}
//Tony 4 1214
Tony Johansson <jo************ *****@telia.com wrote:
I'm reading in a book and they use definition sometimes and declaration
sometimes.
I just want to use the correct terminologi when I talk about these kind of
things.
Below is an example from a book.
The two rows that begin with public delegate void...
and
public event MoveRequest ...
what is each one according to you. Is it a definition or declaration?
They're both declarations. One is a delegate type declaration, and the
other is an event declaration.
--
Jon Skeet - <sk***@pobox.co m> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
These terms are synonymous.
--
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Tony Johansson" <jo************ *****@telia.com wrote in message
news:Wj******** ********@newsb. telia.net...
Hello!
I'm reading in a book and they use definition sometimes and declaration
sometimes.
I just want to use the correct terminologi when I talk about these kind of
things.
Below is an example from a book.
The two rows that begin with public delegate void...
and
public event MoveRequest ...
what is each one according to you. Is it a definition or declaration?
class GameController
{
public delegate void MoveRequest(obj ect sender, MoveRequestEven tArgs e);
public event MoveRequest OnMoveRequest;
... ... ...
}
//Tony
-----Original Message-----
From: Bob Powell [MVP] [mailto:bo*@spam killerbobpowell .net]
Posted At: Sunday, 2 December 2007 10:20 AM
Posted To: microsoft.publi c.dotnet.langua ges.csharp
Conversation: A question about definition and declaration
Subject: Re: A question about definition and declaration
These terms are synonymous.
--
--
Bob Powell [MVP]
Visual C#, System.Drawing
To clarify Bob's statement, these terms are synonymous in Visual C#.
Some other languages, for example, C and C++, have difference between
Definition and Declaration.
Hello,
These terms are synonymous.
Even for Partial Methods?
(H) Serge This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: newmans |
last post by:
Perhaps one of the experts can straighten me out on this point...
In Bjarne Stroustrup's book 'The C++ Programming Language' 3rd Edition,
section 4.9, indicates that
typedef complex<short> Point;
is not only a declaration, but also a definition.
The ISO/IEC 14882:2003(E) standard states in section 3.1 clause 2 that
|
by: J. J. Farrell |
last post by:
After many years of dealing with definition and linkage issues
in ways that I know to be safe, I've decided it's time to try
to understand this area properly. Consider a header file with
the file scope declaration
int i;
This header is included in two files that refer to i but do not
declare it. The two files build together into a single program.
|
by: fctk |
last post by:
source: http://rm-f.net/~orange/devel/specifications/c89-draft.html#3.1.2.2
there are two passages in this paragraph i can't fully understand:
1) "If the declaration of an identifier for an object or a function
contains the storage-class specifier extern , the identifier has the
same linkage as any visible declaration of the identifier with file
scope. If there is no visible declaration with file scope, the
identifier has external...
|
by: questions? |
last post by:
say I have a structure which have an array inside.
e.g.
struct random_struct{
char name;
int month;
}
if the array is not intialized by me, in a sense after I allocated a
|
by: Steven T. Hatton |
last post by:
No, this is not a troll, and I am not promoting Java, C-flat, D, APL, Bash,
Mathematica, SML, or LISP. A college teacher recently posted to this
newsgroup regarding her observation that there has been a significant
decline in the number of students opting to take courses in C++. I just
want to let people know what I believe are the biggest obstacles to C++
language acquisition, and what aspects of the language make it less
appealing than...
| |
by: Jess |
last post by:
Hello,
I was told that if I declare a static class constant like this:
class A{
static const int x = 10;
};
then the above statement is a declaration rather than a definition.
As I've *defined* "x"'s value to be 10, isn't above statement a
|
by: vaib |
last post by:
hi to all.i'd like to know the actual difference between variable
declaration and definition.it would be very helpful if anyone out
there wud help me out with this thing.i'm writing here after here
after a long time since people here also helped me out with my lexer.
thanking in anticipation.
|
by: Haskell Prelude |
last post by:
Hello Friends -
Can anyone answer these C questions?
1. What is the effect of making an internal (local) variable static?
2. What is the effect of making an external (non-local) variable static?
3. What, possibly including garbage, is output by the following code?
int a = 10;
int b = 12;
|
by: gw7rib |
last post by:
I was having linking errors when I put:
const LPCTSTR Main_window_name = _TEXT("Thingy_main_window");
in one file and
extern const LPCTSTR Main_window_name;
in another. I've since realised that this is because (in C++) consts
do not, by default, have external linkage. I've solved the problem by
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |