Aside

C# Delegates, Function and Action

  • Delegate: is an object that point to method
  • Function: is a generic delegate class created in .NET that has return type
  • Action: is a generic delegate class created in .NET that do not have return type

In application programming, we seldom use delegate as we rely on the predefined generic delegate class created in .NET library more often which they are – Function & Action. Function and Action are used as somesort of “method variable handle” that can be pass around. The only difference between Function and Action is the earlier come with return type while the later doesn’t.

C# Quick Programming Note 2: Delegates, Function and Action

Advertisements

One comment


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s