Код: Выделить всё
Children = new object[]
{
new
{
name = "path",
fill_rule = "evenodd" ,
clip_rule = "evenodd",
d = "M8 16L3.54223 12.3383C1.93278 11.0162 1 9.04287 1 6.96005C1"
+ " 3.11612 4.15607 0 8 0C11.8439 0 15 3.11612 15 6.96005C15"
+ " 9.04287 14.0672 11.0162 12.4578 12.3383L8 16ZM3 6H5C6.10457"
+ " 6 7 6.89543 7 8V9L3 7.5V6ZM11 6C9.89543 6 9 6.89543 9 8V9L13 7.5V6H11Z",
fill = "#000000"
}
};
< /code>
Я использую приложение с именем optix из «Аллена Брэдли». Версия «1.6.2.36», версии .NET, установленные на компьютере: < /p>
Microsoft .NET Runtime - 8.0.7 (x86)
Microsoft .NET SDK 9.0.301 (x64)
Microsoft ASP.NET Core 8.0.7
OPC .NET API 2.00 Redistributables 106.0
< /code>
Это мой код C# для анализа объекта: < /p>
for (int intChild = 0; intChild < Children.Length; intChild++)
{
object objChild = Children[intChild];
Console.WriteLine($"intChild:{intChild}");
PropertyInfo[] aryProperties = objChild.GetType().GetProperties();
Console.WriteLine($"PropertyInfo.Length: {aryProperties.Length}");
foreach (PropertyInfo piMember in aryProperties)
{
Console.WriteLine($"Name:{piMember.Name}");
var varValue = piMember.GetValue(objChild);
if (varValue == null)
{
continue;
}
Console.WriteLine($"Value:{varValue}");
}
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... opertyinfo
Мобильная версия