SoFunction
Updated on 2025-03-07

Automatically output the field value of the class to share practical code

namespace
{
    public static class ToStringHelper
    {
        public static string ToString(object obj)
        {
            Type t = ();
            FieldInfo[] fis = ();
            return (,
                                <FieldInfo, string>
                                    (p => + ":" + (obj).ToString()).ToArray()
                                );
        }
    }
}