Our first .NET article!
vbXzone is happy to bring you .NET development information. All .NET languages (Managed C++, C#, VB.NET, J#) are somewhat all equal in power that they bring to a developer. So we picked VB.NET be our coding language here, although almost always (with minor tweakings) concepts apply to all .NET languages. So please enjoy when we introduce article #1 in .NET series.
How to use File class
If System.IO.File.Exists( "c:\test.txt" ) Then
Console.WriteLine("Yes, it exists")
Console.WriteLine("No, it doesn't exist")
Simple enough. If you don't want to call System.IO.File.somemetodname, just add Imports System.IO statement before any class or module declarations in your .vb file (that's where VB.NET code resides now) and you can call the statement in the example like this: File.Exists("c:\test.txt").
Here is more operation you can do with File class ( for more info on these operations, please reffer to MSDN website at msdn.microsoft.com):Create a file, Delete a file, get or set attributes of the file, get or set creation time, get or set last access time, last write time, creation time. Pretty useful class.
So this is our first (and short) article on .NET. If you have any suggestions, questions or requests of topics you would like us to discuss here, please email them to email@example.com
Written By Laimonas Simutis. 2002. firstname.lastname@example.org