API or .NET?

dannyres

Well-known member
Joined
Aug 29, 2003
Messages
67
Hi guys, im just wondering... say i wanted to do some file operations like delete a file/copy a file. Which would be faster:

Using System.IO or Using Windows API?

MY application needs to go as fast as possible as its copying alot of files.



Thanks, Dan
 
The .NET common language runtime is meant to be platform non-specific. Whenever you use a Windows API call, youre tying your code to the specific platform (that is, a specific version of Windows, and Windows itself, as opposed to some other operating system) on which you wrote it. Converting your code to another platform, should that ever become necessary, will require modifications to each line of code that uses the API call

Its not faster , but I suggest you to replace the API Calls with .NET Framework Classes whenever it is possible
 
Back
Top