Introduction
Hi Everyone. Today, I would like to share information about the Anonymous Method.
Description
The name itself describes it as "Anonymous". It means a method that does not have any name. We need not specify any return type for Anonymous method. For your understanding, I will give one small example, as shown below.
Example
- Delegate(Student s).
- Class student {
- Public int Id {
- get;
- set;
- }
- Public string Name {
- get;
- set;
- }
- }
- Delegate bool IsCheck(Student s)
- Class student _Extend {
- List < student > objstudents = new list < student > () {
- New student {
- ID = 1, Name = "Vetri"
- }
- };
- }
- IsCheck objChk = delegate(student s) { return s.id>=1;};
Conclusion: So, this was a small example of Anonymous method.

Join the conversation! Your thoughts help the community grow.