I have a question about delegation in this code, I am adding three methods for delegation. The string will return. In line
string delOut = del ("Beer");
give my valuable delegate delOut this "Length: 4"
How can I collect all the rows returned by methods in delegates?
public class NaForum { public delegate string MyDelegate(string s); public void TestDel() { MyDelegate del = s => s.ToLower(); del += s => s.ToUpper(); del += s => string.Format("Length : {0}", s.Length); string delOut = del("Beer"); Console.WriteLine(delOut); } }
Thanks for any answers.
Zabaa source share