Nettiers.AdventureWorks.Entities.EntityUtil.GetPropertyValue C# (CSharp) Method

GetPropertyValue() public static method

Gets the value of the property with the specified name.
public static GetPropertyValue ( Object item, String propertyName ) : Object
item Object An object instance.
propertyName String The property name.
return Object
		public static Object GetPropertyValue(Object item, String propertyName)
		{
			PropertyInfo property = null;
			return GetPropertyValue(item, propertyName, out property);
		}

Same methods

EntityUtil::GetPropertyValue ( Object item, String propertyName, PropertyInfo &property ) : Object

Usage Example

コード例 #1
0
        /// <summary>
        /// Gets the value of the property with the specified name and returns
        /// it as a collection of objects.
        /// </summary>
        /// <param name="entity">An object instance.</param>
        /// <param name="propertyName">The property name.</param>
        /// <returns>A collection of objects.</returns>
        public static IList GetEntityList(Object entity, String propertyName)
        {
            Object list = EntityUtil.GetPropertyValue(entity, propertyName);

            return(GetEntityList(list));
        }