Lidarr/NzbDrone.Common.Test/ReflectionExtensions.cs

16 lines
367 B
C#
Raw Normal View History

2012-09-11 06:35:25 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NzbDrone.Common.Test
{
public static class ReflectionExtensions
{
public static T GetPropertyValue<T>(this object obj, string propertyName)
{
return (T)obj.GetType().GetProperty(propertyName).GetValue(obj, null);
}
}
}