What is the purpose of ISVirtual property in C# Reflection?

 Posted by Rajnilari2015 on 9/22/2015 | Category: C# Interview questions | Views: 1600 | Points: 40

The IsVirtual property of MethodBase class gets a value indicating whether the method is virtual.It returns true if this method is virtual; otherwise, false. It is defined as
public bool IsVirtual { get; }


.Where(p => p.GetAccessors()[0].IsVirtual)
.ForEach(i => Console.WriteLine(i.Name));

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response