Saturday 15 March 2014

C# - Generic Action? -


I am using .NET Framework 4.0. Looking for the document for action, they compare this example to the representative of the action:

  representative of zero performance messages (string message); Public Category TestCustomDelegate {Public Fixed Zero Main () {DisplayMessage messageTarget; ...}}   

and:

  public class test action 1 {public static zero main () {action & lt; String & gt; MessageTarget; ...}}   

But how do I create it by using an action instead of a representative?

  Zero display message message & lt; T & gt; (T message); Public Category TestCustomDelegate {Public Fixed Zero Main () {DisplayMessage & lt; String & gt; MessageTarget; ...}}   

Edit: I forgot the definition of my message, the goal declaration was added to it now.

Your representative will be absolutely action & lt; T & gt; , but with a different name

You can use it in the same way.

No comments:

Post a Comment