about delegate

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hello!

When I define a class the default access modifier is internal.

So if I just write
class MyTest
{
. . .
}
this definition has internal as access modifier

but if I define a delegate as
delegete returnType SomeName (someArgumentList);
Is it the same here that internal is the default access modifier if none is
given

//Tony
 
Tony Johansson said:
this definition has internal as access modifier

but if I define a delegate as
delegete returnType SomeName (someArgumentList);
Is it the same here that internal is the default access modifier if none is
given

If it's declared outside another type, that's true.
If it's declared within another type, it's private by default. (The
same is true for other types too.)
 
Hello!

When I write this delegete returnType SomeName (someArgumentList);
I call it to define a delegate but you call it to declare.
In C++ it was a big difference between define a class and to declare a
class.

In my exemple here with the delegate I assume you agree with me
that to define and declare is the same.

It's just a matter of taste.

//Tony
 
Tony Johansson said:
When I write this delegete returnType SomeName (someArgumentList);
I call it to define a delegate but you call it to declare.

Well, it's declaring a delegate type.
In C++ it was a big difference between define a class and to declare a
class.

In my exemple here with the delegate I assume you agree with me
that to define and declare is the same.

Well, it depends what you use "declare" and "define" to mean. I tend to
use "declaration" because that's what the spec does. For instance:

"A delegate-declaration is a type-declaration (§9.6) that declares a
new delegate type."
 

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

Similar Threads


Back
Top