Login Register






[Release] Steam Resolver filter_list
Author
Message
RE: [Release] Steam Resolver (with a GUI) #7
1. Not disposing of your WebClient() which you instantiate a new instance of on the heap every call:
Code:
Public Function Steam(ByVal SteamID As String) As String Dim hay As String = New WebClient().DownloadString(("http://tf2-trader.com/bans/index.php?p=banlist&searchText=" & SteamID.Replace(":", "%3A") & "&Submit=")) Return Me.GetExternalIp(hay) End Function

Same thing with Steam2(). Although this could become an overloaded method instead of what you're doing there.

2. This couldn't be any more poor, in terms of a validation check...
Code:
Private Sub PictureBox6_Click(ByVal sender As Object, ByVal e As EventArgs) Try Dim ping As New Ping If (ping.Send(Me.TextBox3.Text).RoundtripTime > 1) Then Me.TextBox3.Text = "IP is alive." End If Catch exception1 As Exception Dim exception As Exception = exception1 Me.TextBox3.Text = "IP is dead." End Try End Sub

If you're going to use the Ping class, you should be using the IPStatus return value instead. This is ALSO a class that implements the IDisposable interface, and you're not calling it's Dispose() method here.

3. You've much overused the Try Catch as a method of error handling which is not good at all. That's lazy error handling and bad coding standards.
-- cxS

[ Haskell/.NET/C/C++ - Software Engineer ]

Reply





Messages In This Thread
[Release] Steam Resolver - by SQLi - 03-12-2013, 12:13 AM
RE: [Release] Steam Resolver (with a GUI) - by cxS - 03-12-2013, 08:25 AM
RE: [Release] Steam Resolver - by sajjad73 - 11-20-2015, 12:41 PM
RE: [Release] Steam Resolver - by pokeemerald - 12-26-2015, 07:50 PM
RE: [Release] Steam Resolver - by Xfcbantox - 02-07-2016, 02:16 PM
RE: [Release] Steam Resolver - by lowwen - 01-11-2020, 11:59 PM
RE: [Release] Steam Resolver - by pennywise48914 - 06-18-2021, 04:23 AM
RE: [Release] Steam Resolver - by parasonic - 11-29-2022, 01:21 PM
RE: [Release] Steam Resolver - by NukeZzZin - 12-18-2022, 07:33 PM