TylerMorrison
Member
- Joined
- Aug 19, 2011
- Messages
- 7
- Programming Experience
- Beginner
Hi Guys, I'm new to these forums so I'm not 100% sure if this is where this should go but oh well 
I'm currently developing a Vb.net application in VB Express. I recently just broke out my class files into a separate project in the same solution as my forms. My error is that whenever I call one of my classes I get an Overload Resolution failed because no accessible 'New' accepts this number of arguments
Projects:
BusinessObjects - Has all of my class files
Spectrum - Has all of the forms
Sample Of Code
Form Call To Business Objects
clsHotListTender
So I'm confused because I Import BusinessObjects so the form should know what clsHotListTender is, and there is a New constructor which takes in one variable so it shouldn't be getting the error.
With that said if I put BusinessObjects.clsHotListTender(myConnString) instead of clsHotListTender(myConnString) I don't get the error. :S
I'm currently developing a Vb.net application in VB Express. I recently just broke out my class files into a separate project in the same solution as my forms. My error is that whenever I call one of my classes I get an Overload Resolution failed because no accessible 'New' accepts this number of arguments
Projects:
BusinessObjects - Has all of my class files
Spectrum - Has all of the forms
Sample Of Code
Form Call To Business Objects
VB.NET:
Imports BusinessObjects
Public Class frmBT
'On Form Load
Private Sub frmBT_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim tenders As New clsHotListTender(myConnString)
End Sub
End Class
clsHotListTender
VB.NET:
Public Class clsHotListTender
Public Sub New(connString as string)
'Initalize class
End Sub
End Class
So I'm confused because I Import BusinessObjects so the form should know what clsHotListTender is, and there is a New constructor which takes in one variable so it shouldn't be getting the error.
With that said if I put BusinessObjects.clsHotListTender(myConnString) instead of clsHotListTender(myConnString) I don't get the error. :S