Im sure this is an easy issue but i have been banging my head on the desk about it.
I have class A which imports class B which imports class C. In class C i have a function that when run produces the following error "Object reference not set to an instance of an object" and the program fails miraculously.
Below is a sample of how im trying to accomplish my goal
Class A
Class B
Class C
Hopefully the simple code example is helpful. The error always pops in class C as i enter into the select statement. Any guidance would be appreciated.
I have class A which imports class B which imports class C. In class C i have a function that when run produces the following error "Object reference not set to an instance of an object" and the program fails miraculously.
Below is a sample of how im trying to accomplish my goal
Class A
Code:
Imports ClassB
public class ClassA
Private var As ClassB = new ClassB("view")
End Class
Code:
Imports ClassC
public class ClassB
Private var2 as ClassC
private var3 as List(Of Image)
Public Sub New(ByVal view as String")
var2 = new ClassC
var3 = Me.var2.getGuide(view)
End Sub
End Class
Code:
Public Class ClassC
private var4 as List(of Image)
Public Function getGuide(ByVal view as String)
var4.clear()
Select Case view
case "view"
var4.add(My.Resources.Logo)
End Select
return var4
End Select
End Function