fork download
  1. using static System.Console;
  2.  
  3. public class Program {
  4. public static void Main() => Teste(new { param2 = 12345, otherParam = "huehuehue" });
  5. public static void Teste<T>(T param){
  6. foreach (var item in typeof(T).GetProperties()) WriteLine($"{item.Name} : {item.GetValue(param, null)}");
  7. }
  8. }
  9.  
  10. //https://pt.stackoverflow.com/q/270821/101
Success #stdin #stdout 0.03s 16512KB
stdin
Standard input is empty
stdout
param2 : 12345
otherParam : huehuehue