Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

INI Filesystem

First turn strict on. Learn data types. Learn about code reuse. Take this

Code
Function DeleteFile(ByVal file As String)
  If (System.IO.File.Exists(file)) Then
    System.IO.File.Delete(file)
  Else
    Return 0
    Exit Function
  End If
  Return 1
    End Function

Functions should have an As clause. Why are you returning 0 or 1? Where is the functions modifier? What about exception handling?

You are using loads of VB6 left overs also.
Msgbox.
Microsoft.VisualBasic.Len.
Like Ident stated, now, let's turn Option Strict on...
This method is far from being efficient.
You could just do something like that:
[Image: 3269089713e50d48e50e4d5bb760fb95.png]

It's smaller, no ?
this edit is getting worse. how is System.IO.File.Exist compatible with net? You really have no fucking clue what u copy and pasted above
System.IO ?
Compatible with .Net ?
Since when ?


Possibly Related Threads...
Thread / Author Replies Views Last Post
by TheArchitectDec 31, 2022 02:38 AM 12 302 Dec 31, 2022 02:38 AM
Last Post: TheArchitect
[C#] by SIM-4785719Jul 27, 2020 06:40 PM 6 214 Jul 27, 2020 06:40 PM
Last Post: gigajew
[.NET] by TostigMay 31, 2019 10:31 AM 4 382 May 31, 2019 10:31 AM
Last Post: Alpha_Coder