
592
|
Chapter 13: The ‘My’ Reference
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
• If the file already exists and uses an encoding method other than the one speci-
fied by this method, the original encoding method of the file will prevail.
Example
The following code creates or overwrites a file with some simple text data.
Dim counter As Integer
Dim outputFile As System.IO.StreamWriter = _
My.Computer.FileSystem.OpenTextFileWriter( _
"c:\temp\data.txt", False) ' False = Overwrite
For counter = 1 To 10
outputFile.WriteLine("This is line " & counter & ".")
Next counter
outputFile.Close( )
Related Framework Entries
• Microsoft.VisualBasic.FileIO.FileSystem.OpenTextFileWriter Method
• Microsoft.VisualBasic.MyServices.FileSystemProxy.OpenTextFileWriter Method
• System.IO.StreamWriter Class
• System.IO.TextWriter Class
See Also
FileSystem Object, OpenTextFieldParser Method, OpenTextFileReader Method,
ReadAllBytes Method, ReadAllText Method, WriteAllBytes Method, WriteAllText
Method
OSFullName Property
Location
My.Computer.Info.OSFullName
Syntax
Dim result As String = My.Computer.Info.OSFullName
Description
The OSFullName property returns the full name of the operating system.
Usage at a Glance
• This property is read-only.
• An exception is thrown if the user does not have sufficient security privileges to
access system information.
• If Windows Management ...