-4
Good morning,
I’m trying to convert a program I did from VB to c#. I’m having a hard time with the headline. In Vb is simple.
Dim Doc As New CblBEDocumento
Dim Mov As CblBELinhaDocGeral
Doc.Ano = 2010
etc. In C# summarized
CblBEDocumento CblDoc = new CblBEDocumento();
CblBELinhaDocGeral MovCbl = new CblBELinhaDocGeral();
resultado = Plataforma.Consulta("Select `from " + tab_tmp + " order by ano, mes ASC");
if (resultado.Vazia())
{
Printa("Não tem movimentos de contabilidade para processar!");
}
else
{
while (!resultado.NoFim())
{
Ano = resultado.Valor("Ano");
Mes = resultado.Valor("Mes");
Dia = resultado.Valor("Dia");
Data_Mov = resultado.Valor("Data_Mov");
Conta_Mov = resultado.Valor("Conta_Mov");
Descritivo = resultado.Valor("Descricao");
Diario = resultado.Valor("Diario");
Debito = resultado.Valor("Val_Deb");
Credito = resultado.Valor("Val_Cred");
CblDoc.set_Ano(Ano);
But when I try to do the CblDoc.Ano = '2010';
He doesn’t recognize the existence of Cbldoc.ano.
I don’t have the option of tampering with the object’s field.
Cbldoc.set_Ano expects a reference, I do not think it is like this.
How do you use this object in C#?
Thank you,
José Rui
Hello are you trying to convert VB.net to C#? It also helps to put more details in the question, more details increases the likelihood of getting desired help.
– Sérgio Sereno
https://docs.microsoft.com/pt-br/dotnet/csharp/programming-guide/classes-and-structs/objects
– Joy Peter
Strange even is the assignment in single quotes, there are double quotes!
– novic