fork download
  1. using static System.Console;
  2.  
  3. public class Program {
  4. public static void Main() => new Exemplo().Ex();
  5. }
  6.  
  7. public class Exemplo {
  8. public int Ex() {
  9. var nomeMetodo = "Macaco" + "Animation";
  10. var Metodo = this.GetType().GetMethod(nomeMetodo);
  11. WriteLine(Metodo.Invoke(this, null));
  12. return 0;
  13. }
  14.  
  15. public string MacacoAnimation() => "macaco";
  16. }
  17.  
  18. //https://pt.stackoverflow.com/q/83577/101
Success #stdin #stdout 0.02s 16196KB
stdin
Standard input is empty
stdout
macaco