foreach (PropertyInfo prop in someObject.GetType().GetProperties()) { Console.WriteLine($"{prop.Name}: {prop.GetValue(someObject, null)}"); }