Answers for "get properties and values from unknown object js"

C#
1

Get properties and values from unknown object

Type myType = myObject.GetType();
IList<PropertyInfo> props = new List<PropertyInfo>(myType.GetProperties());

foreach (PropertyInfo prop in props)
{
    object propValue = prop.GetValue(myObject, null);

    // Do something with propValue
}
Posted by: Guest on January-06-2021

Code answers related to "get properties and values from unknown object js"

C# Answers by Framework

Browse Popular Code Answers by Language