In article <IG****************@newsfe1-gui.ntli.net>, Scott wrote:
Hopefully that will read better...
I need to output to a new file that must be created on the desktop... a lot
of the code is pre-fixed with the variables filling in the blanks... The
most important thing is saving to the desktop on any particular machine,
within the network...
Here is the original text I wrote...
I wish to create a text document (to the users desktop on any machine) which
outputs to a standard text file with information obtained from there use of
my program... Some of the text will be fixed and some will be variables
generated in VB.net. For example...
You have chosen a SINGLE TRIP, which is within EUROPE and is for FAMILY and
last for 27 days. The trips starts from 24/04/05 until 30/04/05 and you
chose to use more than 17 days of winter sports. The total price for your
trip £155.00.
The BOLD CAPS mean they are variables from VB.net.
Any help would be appreciated!!!
Scott
See my original reply...
Option Strict On
Option Explicit On
Imports System
Public Class Example
Private Const String MESSAGE_TEMPLATE = _
"You have chosen a {0}, which is within {1} and is for {2} and last for 27 days. The trips starts from 24/04/05 until 30/04/05 and you chose to use more than 17 days of winter sports. The total price for your trip £155.00."
Public Shared Sub Main ()
Console.WriteLine _
(MESSAGE_TEMPLATE, "SINGLE TRIP", "EUROPE", "FAMILY")
End Sub
End Class
You could also format it to a string using String.Format...
Dim Message As String = String.Format _
(MESSAGE_TEMPLATE, "SINGLE TRIP", "EUROPE", "FAMILY")
Console.WriteLine (Message)
--
Tom Shelton [MVP]