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

A question about definition and declaration

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(object sender, MoveRequestEventArgs e);
public event MoveRequest OnMoveRequest;
.... ... ...
}

//Tony
Dec 1 '07 #1
4 1194
Tony Johansson <jo*****************@telia.comwrote:
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.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Dec 1 '07 #2
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.comwrote 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(object sender, MoveRequestEventArgs e);
public event MoveRequest OnMoveRequest;
... ... ...
}

//Tony

Dec 2 '07 #3

-----Original Message-----
From: Bob Powell [MVP] [mailto:bo*@spamkillerbobpowell.net]
Posted At: Sunday, 2 December 2007 10:20 AM
Posted To: microsoft.public.dotnet.languages.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.

Dec 3 '07 #4
Hello,
These terms are synonymous.
Even for Partial Methods?

(H) Serge
Dec 4 '07 #5

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

Similar topics

8
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>...
19
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...
13
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...
30
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
75
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...
9
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...
15
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...
16
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...
5
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...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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.