Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
2.00/5 (3 votes)
See more:
What are delegates and #region directive in vb.net and c#.net. and what are its uses ?
Posted

For delegates, have a look here:
http://msdn.microsoft.com/en-us/library/ms173171.aspx[^]
http://msdn.microsoft.com/en-us/library/ms172879.aspx[^]

And using #region, you can create a block that you can collapse/expand in Visual Studio:
C#
#region Name of region
    // your code here
    // now you can collapse the code in this block (in Visual Studio)
    // when collapsed, you can expand it
#endregion
 
Share this answer
 
For delegates:

check this[^]

This[^]

this[^]

this[^]

for region:

this[^]

this[^]

this[^]
 
Share this answer
 
These are 2 different things, Region - used to structure the code like comment , i mean you can segregate code , functions, class using region.

Delegate - this a function pointer, you can set callbacks using this, so that you won' t have fit your function name as hardcoded function name in any module.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900