Sandbox.MemberDescription[] DeclaredMembers { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The DeclaredMembers property provides an array of MemberDescription objects that represent the members (such as methods, properties, etc.) declared specifically by the type described by this TypeDescription instance. It does not include members that are inherited from base types.

Usage

Use the DeclaredMembers property when you need to access or inspect only the members that are explicitly declared by a type, excluding any inherited members. This can be useful for reflection tasks where you want to differentiate between a type's own members and those it inherits from its base types.

Example

// Example of accessing DeclaredMembers
TypeDescription typeDescription = TypeLibrary.GetTypeDescription(typeof(MyClass));
MemberDescription[] declaredMembers = typeDescription.DeclaredMembers;

foreach (var member in declaredMembers)
{
    Console.WriteLine($"Member Name: {member.Name}, Member Type: {member.MemberType}");
}