Jag får kompileringsfel enligt nedan: Metodsignaturerna stämmer inte överens, den första metoden har följande argument :Konvertering VB6 till VB.NET
<info>
Method 'Private Sub ConnectedGroupReg_DataChange(TransactionID As Integer, NumItems As Integer,
ByRef ClientHandles() As Integer, ByRef ItemValues() As Object, ByRef Qualities() As Integer, ByRef
TimeStamps() As Date)'
cannot handle Event 'Public Event DataChange(TransactionID As Integer, NumItems As Integer, ByRef
ClientHandles As System.Array, ByRef ItemValues As System.Array, ByRef Qualities As System.Array,
ByRef TimeStamps As System.Array)' because they do not have the same signature.
</info>
Eventet ser ut så här:
<code>Private Sub ConnectedGroupReg_DataChange(ByVal TransactionID As Integer, ByVal NumItems As
Integer, ByRef ClientHandles() As Integer, ByRef ItemValues() As Object, ByRef Qualities() As Integer,
ByRef TimeStamps() As Date) Handles ConnectedGroupReg.DataChange
...
End Sub
</code>
Har det någonting att göra med datatypen Date?Sv: Konvertering VB6 till VB.NET
TransactionID As Integer
NumItems As Integer
ByRef ClientHandles() As Integer
ByRef ItemValues() As Object
ByRef Qualities() As Integer
ByRef TimeStamps() As Date
Den andra har nedanstående:
TransactionID As Integer
NumItems As Integer
ByRef ClientHandles As System.Array
ByRef ItemValues As System.Array
ByRef Qualities As System.Array
ByRef TimeStamps As System.Array
Metoderna måste matcha med antal argument, byref/byval, samt datatyperna på varje argument.
Du måste skriva om antingen anropet eller eventet så att de matchar varandra.