wasSharp
/Reflection.cs |
@@ -258,6 +258,18 @@ |
/////////////////////////////////////////////////////////////////////////// |
// Copyright (C) 2016 Wizardry and Steamworks - License: GNU GPLv3 // |
/////////////////////////////////////////////////////////////////////////// |
/// <summary>Return all the run-time properties for an object.</summary> |
/// <param name="o">the object whose properties to return</param> |
/// <returns>the property information for all the properties of the object</returns> |
public static IEnumerable<FieldInfo> GetFieldsInfo<T>(this T o) |
{ |
foreach (var p in o.GetType().GetRuntimeFields()) |
yield return p; |
} |
|
/////////////////////////////////////////////////////////////////////////// |
// Copyright (C) 2016 Wizardry and Steamworks - License: GNU GPLv3 // |
/////////////////////////////////////////////////////////////////////////// |
/// <summary> |
/// Enumerate all the base types recursively starting from a type. |
/// </summary> |