0
I am creating a library to validate the Fiscal SPED in VB.NET and to streamline the process of creating lines, each class already has its pre-defined attributes and in the order according to the documentation, as it is in the example below:
' REGISTRO 0001: ABERTURA DO BLOCO 0
Public Class Registro0001
' Texto fixo contendo “0001”.
Public Shared reg As String = "0001"
' Indicador de movimento:
' 0- Bloco com dados informados;
' 1- Bloco sem dados informados.
Public indMov As String = ""
' construtor
Public Sub New(_reg As String, _indMov As String)
reg = _reg
indMov = _indMov
End Sub
Public Overrides Function ToString() As String
Return $"|{reg}|{indMov}|"
End Function
End Class
Is there any way that I can take all the properties that exist within the class in the order that were declared and use the instantiated content in them within my method ToString()
?
I was thinking of something close thereof but I can’t understand how.
There’s something wrong with the answer?
– Maniero