I have upgraded 16591 lines of code program from VB6 to .NET.
There was a lot of errors and warning that i fixed but i stuck on those.
First one comes here:
Code:
Function FoundBotName(ByRef thebotname As String) As Object
Dim check As Short
'UPGRADE_WARNING: Couldn't resolve default property of object FoundBotName.
FoundBotName = True
Do
check = check + 1
If LCase(BotName(check)) = LCase(thebotname) Then Exit Function
Loop Until check = BotMax
'UPGRADE_WARNING: Couldn't resolve default property of object FoundBotName.
FoundBotName = False
End Function
Couldn't resolve default property of object FoundBotName
Second one:
Code:
Function BotsInSector(ByRef theSectorNumber As Short, ByRef theZone As Short) As String
Dim check As Short
Do
check = check + 1
If BotSector(check) = theSectorNumber And theZone = BotZone(check) And BotHull(check) <> 0 Then
BotsInSector = "," & BotShipClass(check) & BotShipKind(check) & BotName(check) & "," & BotGuild(check) & BotsInSector
End If
Loop Until check = BotMax
Return Nothing
End Function
Variable BotsInSector is used before it has been assigned a value. A null reference exception could result at runtime.
And the last one:
Code:
Function HomeEncrypt(ByRef Message As String, ByRef ****youcodetheif As Short) As String
If Len(Message) = 0 Then Exit Function
Function HomeEncrypt doesn't return a value on all code paths. A null reference exception could occurs at runtime when the result is used.
Thanks in advance.
- Netherdrake
Bookmarks