fork download
  1. public class Program {
  2. public static void Main() {
  3. var vmc = new ApoQueueVMConstrutor(); //construiu sem inicializar nada, mesmo sem ter sido declarado, o construtor está lá
  4. var vm1 = new ApoQueueVM("xxx", "yyy"); //construiu conforme o esperado
  5. // var vm2 = new ApoQueueVM(); //não existe construtor com esta assinatura
  6. }
  7. }
  8.  
  9. public class ApoQueueVM {
  10. public ApoQueueVM(string apoQueue, string apoFileBL) {
  11. this.EnableExport = true;
  12. this.KeyFigure = apoQueue;
  13. this.PathFileGenerated = apoFileBL;
  14. }
  15.  
  16. public string KeyFigure { get; set; }
  17. public bool HaveInconsistencies { get; set; }
  18. public string PathFileGenerated { get; set; }
  19. public bool EnableExport { get; set; }
  20. }
  21.  
  22. public class ApoQueueVMConstrutor {
  23. public string KeyFigure { get; set; }
  24. public bool HaveInconsistencies { get; set; }
  25. public string PathFileGenerated { get; set; }
  26. public bool EnableExport { get; set; }
  27. }
  28.  
  29. //https://pt.stackoverflow.com/q/169742/101
Success #stdin #stdout 0.01s 13812KB
stdin
Standard input is empty
stdout
Standard output is empty