...but for the most part there are no functions in C#. One cannot use the terms function and method interchangeably as one may in some situations in JavaScript where every method is a function if not the other way around. (A method is a function hanging off of a JSON object as a property therein.) There are also Equals O'Arrow anonymous functions too in C#:
delegate void TestDelegate(string s);
TestDelegate foo = (x) => { Console.WriteLine(x); };
foo("Hello World!");
No comments:
Post a Comment