Hi,
Can anyone help with this? I'm trying to instantiate a class that I created from another using the New contronstuctor. I want to pass data to the class as I instantiate it based on a couple scenarios. So I created a couple overloads for the New constructor, both of which are working until I add another value to one of the constructors.
Public Sub New(ByVal IPAddress As String, ByVal Port As String, ByVal SSL As Boolean, ByVal Device As DeviceType, ByVal LoggingLevel As Integer)
this one works by calling this....
PAYCLASS= PAY.Charge(strIPAddress, strPort, blnSSL, intDevice, intLogging)
Public Sub New(ByVal ComPort As String, ByVal Baud As String, ByVal Parity As String, ByVal Databits As String, ByVal Device As DeviceType, ByVal LoggingLevel As Integer)
this one works by calling this....
PAYCLASS= PAY.Charge(strCom, strBaud, strParity, strBits, intDevice, intLogging)
I want to add a new value to the first constructor:
Public Sub New(ByVal IPAddress As String, ByVal Port As String, ByVal SSL As Boolean, ByVal Device As DeviceType, ByVal LoggingLevel As Integer, ByVal SSLCertificate as String)
When I do this, I get errors on both of the calls to that class:
Overload resolution failed because no accessible 'New' can be called without a narrowing conversion:
'Public Sub New(IPAddress As String, Port As String, SSL As Boolean, Device As SIM.Charge.DeviceType, LoggingLevel As Integer, SSLCertificate As String)': Argument matching parameter 'SSL' narrows from 'String' to 'Boolean'.
'Public Sub New(IPAddress As String, Port As String, SSL As Boolean, Device As SIM.Charge.DeviceType, LoggingLevel As Integer, SSLCertificate As String)': Argument matching parameter 'Device' narrows from 'String' to 'SIM.Charge.DeviceType'.
'Public Sub New(ComPort As String, Baud As String, Parity As String, Databits As String, Device As SIM.Charge.DeviceType, LoggingLevel As Integer)': Argument matching parameter 'Device' narrows from 'Integer' to 'SIM.Charge.DeviceType'.
'Public Sub New(ComPort As String, Baud As String, Parity As String, Databits As String, Device As SIM.Charge.DeviceType, LoggingLevel As Integer)': Argument matching parameter 'LoggingLevel' narrows from 'String' to 'Integer'.
AND
Overload resolution failed because no accessible 'New' can be called without a narrowing conversion:
'Public Sub New(IPAddress As String, Port As String, SSL As Boolean, Device As SIM.Charge.DeviceType, LoggingLevel As Integer, SSLCertificate As String)': Argument matching parameter 'Device' narrows from 'Integer' to 'SIM.Charge.DeviceType'.
'Public Sub New(ComPort As String, Baud As String, Parity As String, Databits As String, Device As SIM.Charge.DeviceType, LoggingLevel As Integer)': Argument matching parameter 'Parity' narrows from 'Boolean' to 'String'.
'Public Sub New(ComPort As String, Baud As String, Parity As String, Databits As String, Device As SIM.Charge.DeviceType, LoggingLevel As Integer)': Argument matching parameter 'Databits' narrows from 'Integer' to 'String'.
'Public Sub New(ComPort As String, Baud As String, Parity As String, Databits As String, Device As SIM.Charge.DeviceType, LoggingLevel As Integer)': Argument matching parameter 'Device' narrows from 'Integer' to 'SIM.Charge.DeviceType'.
'Public Sub New(ComPort As String, Baud As String, Parity As String, Databits As String, Device As SIM.Charge.DeviceType, LoggingLevel As Integer)': Argument matching parameter 'LoggingLevel' narrows from 'String' to 'Integer'. C:\Projects\SIM\SIM Sample\SIM Sample\Main.vb 60 28 SIM Sample
Can anyone help with this? I'm trying to instantiate a class that I created from another using the New contronstuctor. I want to pass data to the class as I instantiate it based on a couple scenarios. So I created a couple overloads for the New constructor, both of which are working until I add another value to one of the constructors.
Public Sub New(ByVal IPAddress As String, ByVal Port As String, ByVal SSL As Boolean, ByVal Device As DeviceType, ByVal LoggingLevel As Integer)
this one works by calling this....
PAYCLASS= PAY.Charge(strIPAddress, strPort, blnSSL, intDevice, intLogging)
Public Sub New(ByVal ComPort As String, ByVal Baud As String, ByVal Parity As String, ByVal Databits As String, ByVal Device As DeviceType, ByVal LoggingLevel As Integer)
this one works by calling this....
PAYCLASS= PAY.Charge(strCom, strBaud, strParity, strBits, intDevice, intLogging)
I want to add a new value to the first constructor:
Public Sub New(ByVal IPAddress As String, ByVal Port As String, ByVal SSL As Boolean, ByVal Device As DeviceType, ByVal LoggingLevel As Integer, ByVal SSLCertificate as String)
When I do this, I get errors on both of the calls to that class:
Overload resolution failed because no accessible 'New' can be called without a narrowing conversion:
'Public Sub New(IPAddress As String, Port As String, SSL As Boolean, Device As SIM.Charge.DeviceType, LoggingLevel As Integer, SSLCertificate As String)': Argument matching parameter 'SSL' narrows from 'String' to 'Boolean'.
'Public Sub New(IPAddress As String, Port As String, SSL As Boolean, Device As SIM.Charge.DeviceType, LoggingLevel As Integer, SSLCertificate As String)': Argument matching parameter 'Device' narrows from 'String' to 'SIM.Charge.DeviceType'.
'Public Sub New(ComPort As String, Baud As String, Parity As String, Databits As String, Device As SIM.Charge.DeviceType, LoggingLevel As Integer)': Argument matching parameter 'Device' narrows from 'Integer' to 'SIM.Charge.DeviceType'.
'Public Sub New(ComPort As String, Baud As String, Parity As String, Databits As String, Device As SIM.Charge.DeviceType, LoggingLevel As Integer)': Argument matching parameter 'LoggingLevel' narrows from 'String' to 'Integer'.
AND
Overload resolution failed because no accessible 'New' can be called without a narrowing conversion:
'Public Sub New(IPAddress As String, Port As String, SSL As Boolean, Device As SIM.Charge.DeviceType, LoggingLevel As Integer, SSLCertificate As String)': Argument matching parameter 'Device' narrows from 'Integer' to 'SIM.Charge.DeviceType'.
'Public Sub New(ComPort As String, Baud As String, Parity As String, Databits As String, Device As SIM.Charge.DeviceType, LoggingLevel As Integer)': Argument matching parameter 'Parity' narrows from 'Boolean' to 'String'.
'Public Sub New(ComPort As String, Baud As String, Parity As String, Databits As String, Device As SIM.Charge.DeviceType, LoggingLevel As Integer)': Argument matching parameter 'Databits' narrows from 'Integer' to 'String'.
'Public Sub New(ComPort As String, Baud As String, Parity As String, Databits As String, Device As SIM.Charge.DeviceType, LoggingLevel As Integer)': Argument matching parameter 'Device' narrows from 'Integer' to 'SIM.Charge.DeviceType'.
'Public Sub New(ComPort As String, Baud As String, Parity As String, Databits As String, Device As SIM.Charge.DeviceType, LoggingLevel As Integer)': Argument matching parameter 'LoggingLevel' narrows from 'String' to 'Integer'. C:\Projects\SIM\SIM Sample\SIM Sample\Main.vb 60 28 SIM Sample