Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

C# traverseall elements in class property

SomeObject.GetType().GetProperties().ToList().ForEach(x => Console.WriteLine($"{x.Name} = {x.GetValue(SomeObject, null)}"));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #traverseall #elements #class #property
ADD COMMENT
Topic
Name
4+5 =