Type.GetDefaultMembers() Method is used to find the members defined for the current Type whose DefaultMemberAttribute is set.
Syntax: public virtual System.Reflection.MemberInfo GetDefaultMembers ();
Return Value: This method returns an array of MemberInfo objects representing all default members of the current Type or an empty array of type MemberInfo, if the current Type does not have default members.
Below programs illustrate the use of Type.GetDefaultMembers() Method:
Result is: Char Chars [Int32]
Result is: System.String name
- Difference between Method Overriding and Method Hiding in C#
- C# | Copy() Method
- C# | ToLower() Method
- Stack.Pop() Method in C#
- C# | StartsWith() Method
- C# | ToUpper() Method
- C# | SortedDictionary.Add() Method
- Stack.Contains() Method in C#
- C# | Join() Method | Set - 1
- C# | PadLeft() Method
- C# | IsNullOrEmpty() Method
- C# | Math.Abs() Method | Set - 2
- C# | Math.Abs() Method | Set - 1
- C# | Math.Log() Method
- C# | Method Parameters
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.