Type.GetElementType() Method is used to return the Type of the object encompassed or referred to by the current array, pointer or reference type when overridden in a derived class.
Syntax: public abstract Type GetElementType ();
Return Value: This method returns the Type of the object encompassed or referred to by the current array, pointer, or reference type, or null if the current Type is not an array or a pointer, or is not passed by reference, or represents a generic type or a type parameter in the definition of a generic type or generic method.
Below programs illustrate the use of Type.GetElementType() Method:
ElementType is: System.Int32
Element type of GFG is null
- Difference between Method Overriding and Method Hiding in C#
- C# | Random.Next() Method
- C# | Method Parameters
- C# | Math.Abs() Method | Set - 2
- C# | Method Overriding
- Main Method in C#
- Decimal.Add() Method in C#
- Method Hiding in C#
- C# | IsNullOrEmpty() Method
- Stack.Contains() Method in C#
- Stack.Pop() Method in C#
- C# | Uri.ToString() Method
- C# | Math.Exp() Method
- C# | Math.Abs() Method | Set - 1
- Queue.Contains() Method in C#
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.