14 lines
369 B
C#
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)"}`")) + "}";
|
|
}
|
|
|
|
}
|
|
}
|