make mirror on github.com

This commit is contained in:
BlubbFish 2021-08-22 00:12:41 +02:00
parent baed3c9e08
commit 528dcabf59
2 changed files with 4 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# BlubbFish.Utils (Utils)
Library containing helpfull utils
Maybe you find this Repo on Github. This is a mirror from [here](https://git.blubbfish.net/vs_utils/Utils).

View File

@ -49,10 +49,12 @@ namespace BlubbFish.Utils {
FieldInfo field = o.GetType().GetField(name);
return field.IsPublic ? field.GetValue(o) : null;
}
public static Object GetField(this Type o, String name) {
FieldInfo field = o.GetField(name);
return field.IsPublic ? field.GetValue(o) : null;
}
public static T GetEvent<T>(this Object o, String name) {
FieldInfo field = o.GetType().GetField(name, BindingFlags.Instance | BindingFlags.NonPublic);
return (T)field?.GetValue(o);