Search Results for

    Show / Hide Table of Contents

    Class ReflectionExtensions

    Defines a collection of extensions for object reflection.

    Inheritance
    System.Object
    ReflectionExtensions
    Namespace: MADE.Runtime.Extensions
    Assembly: MADE.Runtime.dll
    Syntax
    public static class ReflectionExtensions : object

    Methods

    | Improve this Doc View Source

    GetPropertyNames(Object)

    Gets all the property names declared for the specified object.

    Declaration
    public static IEnumerable<string> GetPropertyNames(this object obj)
    Parameters
    Type Name Description
    System.Object obj

    The object to retrieve property names from.

    Returns
    Type Description
    IEnumerable<System.String>

    A collection of object property names as a string.

    | Improve this Doc View Source

    GetPropertyValue<T>(Object, String)

    Gets a value for a property of the obj based on the property.

    Declaration
    public static T GetPropertyValue<T>(this object obj, string property)
    
        where T : class
    Parameters
    Type Name Description
    System.Object obj

    The object to retrieve the property value from.

    System.String property

    The name of the property to retrieve a value for.

    Returns
    Type Description
    T

    The value of the property.

    Type Parameters
    Name Description
    T

    The type of expected value.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright (c) MADE Apps