Class structure

  • Thread starter Thread starter Carl Forsman
  • Start date Start date
C

Carl Forsman

Java only has Class and Interface structure

while C# has Class, Interface, Structure, Enums and Delegates?

What is Delegates in C#? is it similar to something in C++ / java?
-OR- it is a total new feature?
 
Java only has Class and Interface structure

while C# has Class, Interface, Structure, Enums and Delegates?

What is Delegates in C#? is it similar to something in C++ / java?
-OR- it is a total new feature?

Delegates are primarily used in C#.NET to define custom events.
 
On Thu, 8 Jan 2009 13:08:09 -0800 (PST),
Delegates are primarily used in C#.NET to define custom events.

so it is same leve as a Class which is not part of the Class?

like Structure, which is an object similalr to a class without
functions.

So as Enums and Interface.

Is Delegates kind of an object similar to a Interface / Structure?
 
Maybe a stretch here, but maybe you can think of delegates as a "already
built in" Observer Design Pattern.

.........
 
Kenneth said:
Think of delegates as typesafe function pointers.

more precisely, pointer-to-member-function which (optionally) carries the
object on which it will be called along with it
 
um ( again ) - I was asking a question not making a statement - java has had
enums since 5.0 released in 2004
 
Back
Top