alexa
Syncfusion
menu Syncfusion

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ReflectionExtensions

    Class which contains properties, methods which helps to reflect the internal methods or fields and also to acquire their values.

    Inheritance
    object
    ReflectionExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Maui.DataSource.Extensions
    Assembly: Syncfusion.Maui.DataSource.dll
    Syntax
    public static class ReflectionExtensions

    Methods

    BaseType(Type)

    Reflection method to get the base type.

    Declaration
    public static Type BaseType(this Type type)
    Parameters
    Type Name Description
    Type type

    Represents the base type.

    Returns
    Type Description
    Type

    Returns the base type.

    GetCulture(CultureInfo)

    Reflection method to obtain the current culture.

    Declaration
    public static string GetCulture(this CultureInfo info)
    Parameters
    Type Name Description
    CultureInfo info

    Represents the culture info.

    Returns
    Type Description
    string

    Returns the string value of determining the culture info.

    GetGenericArguments(Type)

    Helper method to get generic arguments from the specified type.

    Declaration
    public static Type[] GetGenericArguments(this Type type)
    Parameters
    Type Name Description
    Type type

    Represents the type which is to be determined.

    Returns
    Type Description
    Type[]

    Returns the generic type arguments.

    GetIsDynamicBound(IEnumerable)

    Helper method to determine whether the obtained enumerable collection is bounded dynamically.

    Declaration
    public static bool GetIsDynamicBound(this IEnumerable collection)
    Parameters
    Type Name Description
    IEnumerable collection

    Represents the enumerable collection

    Returns
    Type Description
    bool

    Returns the boolean value accordingly.

    GetMember(Type, string)

    Helper method to get the members from the specified base type.

    Declaration
    [RequiresUnreferencedCode("The GetMember is not trim compatible")]
    public static IEnumerable<MemberInfo> GetMember(this Type type, string name)
    Parameters
    Type Name Description
    Type type

    Represents the type which is to be determined.

    string name

    Represents the name of the member function which is to be determined.

    Returns
    Type Description
    IEnumerable<MemberInfo>

    Returns the enumerable collection of member functions from the specified type.

    GetMethod(Type, string, Type[])

    Helper method to get a particular method from the specified type.

    Declaration
    [RequiresUnreferencedCode("The GetMethod is not trim compatible")]
    public static MethodInfo GetMethod(this Type type, string name, Type[] types)
    Parameters
    Type Name Description
    Type type

    Represents the type which is to be determined.

    string name

    Represents the name of the method which is to be determined.

    Type[] types

    Represents the types from which the method is to be obtained.

    Returns
    Type Description
    MethodInfo

    Returns the obtained method info.

    GetMethods(Type)

    Helper method to get the methods from the specified base type.

    Declaration
    [RequiresUnreferencedCode("The GetMethods is not trim compatible")]
    public static IEnumerable<MethodInfo> GetMethods(this Type type)
    Parameters
    Type Name Description
    Type type

    Represents the type which is to be determined.

    Returns
    Type Description
    IEnumerable<MethodInfo>

    Returns the enumerable collection of method names.

    GetProperties(Type)

    Reflection helper method to get the properties from the mentioned type.

    Declaration
    [RequiresUnreferencedCode("The GetProperties is not trim compatible")]
    public static IEnumerable<PropertyInfo> GetProperties(this Type type)
    Parameters
    Type Name Description
    Type type

    Represents the type from which the properties has to be obtained.

    Returns
    Type Description
    IEnumerable<PropertyInfo>

    Returns the properties

    GetProperty(Type, string)

    Helper method to get a particular property from the specified type.

    Declaration
    [RequiresUnreferencedCode("The GetProperty is not trim compatible")]
    public static PropertyInfo GetProperty(this Type type, string name)
    Parameters
    Type Name Description
    Type type

    Represents the type which is to be determined.

    string name

    Represents the name of the property which is to be determined.

    Returns
    Type Description
    PropertyInfo

    Returns the obtained property info.

    IsAbstract(Type)

    Reflection method to check whether the obtained type is abstract.

    Declaration
    public static bool IsAbstract(this Type type)
    Parameters
    Type Name Description
    Type type

    Represents the type which is to be determined.

    Returns
    Type Description
    bool

    Returns the boolean value regarding the obtained type.

    IsAssignableFrom(Type, Type)

    Reflection method to determine whether the source type can be assigned to destination type.

    Declaration
    public static bool IsAssignableFrom(this Type type, Type typeInfo)
    Parameters
    Type Name Description
    Type type

    Represents the source type.

    Type typeInfo

    Represents the destination type.

    Returns
    Type Description
    bool

    Returns the boolean value whether the source type can to assigned to destination type.

    IsEnum(Type)

    Reflection method to check whether the obtained type is enumerated type.

    Declaration
    public static bool IsEnum(this Type type)
    Parameters
    Type Name Description
    Type type

    Represents the type which is to be determined.

    Returns
    Type Description
    bool

    Returns the boolean value regarding the obtained type.

    IsGenericType(Type)

    Reflection method to check whether the obtained type is generic type. Can be a generic type definition, an open constructed type, or a closed constructed type.

    Declaration
    public static bool IsGenericType(this Type type)
    Parameters
    Type Name Description
    Type type

    Represents the type which is to be determined.

    Returns
    Type Description
    bool

    Returns the boolean value regarding the obtained type.

    IsGenericTypeDefinition(Type)

    Reflection method to check whether the obtained type is generic type. A constructed type is created by calling the MakeGenericType method on a Type object that represents a generic type definition and specifying an array of type arguments.

    Declaration
    public static bool IsGenericTypeDefinition(this Type type)
    Parameters
    Type Name Description
    Type type

    Represents the type which is to be determined.

    Returns
    Type Description
    bool

    Returns the boolean value regarding the obtained type.

    IsInterface(Type)

    Reflection method to check whether the obtained type is an interface.

    Declaration
    public static bool IsInterface(this Type type)
    Parameters
    Type Name Description
    Type type

    Represents the type which is to be determined.

    Returns
    Type Description
    bool

    Returns the boolean value regarding the obtained type.

    IsPrimitive(Type)

    Reflection method to check whether the obtained type is primitive type.

    Declaration
    public static bool IsPrimitive(this Type type)
    Parameters
    Type Name Description
    Type type

    Represents the type which is to be determined.

    Returns
    Type Description
    bool

    Returns the boolean value regarding the obtained type.

    IsValueType(Type)

    Reflection method to check whether the obtained type is value type.

    Declaration
    public static bool IsValueType(this Type type)
    Parameters
    Type Name Description
    Type type

    Represents the type which is to be determined.

    Returns
    Type Description
    bool

    Returns the boolean value regarding the obtained type.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved