What's the difference between:
namespace WMB.CieloB
{
internal class FuncoesCielo
{
internal FuncoesCielo(int iDC, Boleto boleto)
{
IDCliente = iDC;
this.boleto = boleto;
}
public int IDCliente { get; set; }
internal Transaction PagamentoComToken()
{
var holder = cielo.holder(IDCliente);
Order orderDadosDoboleto = cielo.order(boleto.BoletoId.ToString(), boleto.Valor );
}
}
}
I'm calling this class through:
namespace WMB.CieloB
{
public class Cobrancas
{
public bool ExecutarRecorrenciaCompleto()
{
IDC = 3;
var boleto = db.boleto.Find(1);//apenas exemplo
var NewPagamento = new FuncoesCielo(IDC, boleto);
var transacao = NewPagamento.PagamentoComToken();
}
}}
In other words, both the CustomerID and the ticket property will be available within the class, but one is property (CustomerID), another is a field (Boleto), I normally declare a field equal to a variable in this case and I declare.
What difference does the IDCliente
use as a method than this.boleto
that has not been declared ( Boleto boleto;
) but can access it within the class.