A question about definition and declaration

T

Tony Johansson

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
 
J

Jon Skeet [C# MVP]

Tony Johansson said:
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.
 
W

Wingot

-----Original Message-----
From: Bob Powell [MVP] [mailto:[email protected]]
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.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top