Last active
October 11, 2017 22:44
-
-
Save wcoastsands/63af6c88c0e1f11c6127e945e0e0581f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if NETFX_CORE // Workaround to support changes in the .Net reflection API for Windows Store Apps | |
using System; | |
using System.Reflection; | |
namespace UnityEngine.Analytics.Experimental.Tracker | |
{ | |
public static class TypeExtensions | |
{ | |
public static PropertyInfo GetProperty(this Type type, string propertyName) | |
{ | |
return type.GetTypeInfo().GetDeclaredProperty(propertyName); | |
} | |
public static FieldInfo GetField(this Type type, string fieldName) | |
{ | |
return type.GetTypeInfo().GetDeclaredField(fieldName); | |
} | |
} | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment