using static System.Console;
public static void Main() => Teste(new { param2 = 12345, otherParam = "huehuehue" });
public static void Teste<T>(T param){
foreach (var item in typeof(T).GetProperties()) WriteLine($"{item.Name} : {item.GetValue(param, null)}");