1
0
mirror of synced 2024-11-30 14:14:29 +01:00
TaikoSoundEditor/Commons/Extensions/ObjectExtensions.cs
2023-10-01 23:06:50 +03:00

14 lines
369 B
C#

using System.Linq;
namespace TaikoSoundEditor.Commons.Extensions
{
internal static class ObjectExtensions
{
public static string ToStringProperties(this object obj)
{
return obj.GetType() + "{" + string.Join("; ", obj.GetType().GetProperties().Select(p => $"{p.Name}=`{p?.GetValue(obj) ?? "(null)"}`")) + "}";
}
}
}