Answers for "how to foreach loop class properties c#"

C#
0

c# loop class properties add to array

Record record = new Record();

PropertyInfo[] properties = typeof(Record).GetProperties();
foreach (PropertyInfo property in properties)
{
    property.SetValue(record, value);
}
Posted by: Guest on November-25-2020

Code answers related to "how to foreach loop class properties c#"

C# Answers by Framework

Browse Popular Code Answers by Language