here is the entire fiddle. https://dotnetfiddle.net/f7VkDe
I have a nested class. however whenever I try to set the inner class it keeps reporting that the inner class is nothing.
Imports System
Public Module Module1
Public Sub Main()
Dim result As New WAWFExport()
result.StartLine = New WAWFStartLine()
result.StartLine.NbrTx = 1
Console.WriteLine(result.StartLine.NbrTx)
End Sub
Public Class WAWFExport
Public Property StartLine() As WAWFStartLine
Get
Return m_StartLine
End Get
Set(value As WAWFStartLine)
m_StartLine = m_StartLine
End Set
End Property
Private m_StartLine As WAWFStartLine
end class
Public Class WAWFStartLine
Implements IWAWFFormatter
Public Property NbrTx() As Integer
Get
Return m_NbrTx
End Get
Set(value As Integer)
m_NbrTx = value
End Set
End Property
Private m_NbrTx As Integer
Private sl As WAWFStartLine
Public Function format() As String Implements IWAWFFormatter.format
Return String.Format("START*{0}^", m_NbrTx.ToString)
End Function
End Class
Friend Interface IWAWFFormatter
Function format() As String
End Interface
End Module
Run-time exception (line -1): Object reference not set to an instance of an object.
Stack Trace:
[System.NullReferenceException: Object reference not set to an instance of an object.]