BindingFlagsDeclaredOnly
BindingFlags is a .NET enumeration that specifies a set of flags to control the behavior of reflection operations. When you use reflection to search for members of a type, such as methods, properties, or fields, you can use BindingFlags to filter the results. This allows you to be more precise about what you are looking for.
Commonly used flags include BindingFlags.Public and BindingFlags.NonPublic, which determine whether to include public or private members,
Furthermore, BindingFlags can be used to specify the type of member being searched for, such as BindingFlags.InvokeMethod,