Having some trouble with what I thought would be a simple task.
I have a file "payrates.txt". I need to read this file which looks like :
I need to then need to increase each one of those integers by 10% and save to "update.txt"
The GUI will only be a convert button and exit button, so no list box's to load anything to. I came up with :
But these produces errors as I cannto convert anything from the string "payrates.text" to decimal.
I have a file "payrates.txt". I need to read this file which looks like :
19
30
9
1
3
..etc from top to bottom.
I need to then need to increase each one of those integers by 10% and save to "update.txt"
The GUI will only be a convert button and exit button, so no list box's to load anything to. I came up with :
VB.NET:
Private Sub increaseButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles increaseButton.Click
Dim payrates As String
payrates = My.Computer.FileSystem.ReadAllText("C:\payrates.txt")
Dim Update As String
Dim isConverted As Boolean
Update = CStr(CDbl(payrates) * 10%))
My.Computer.FileSystem.WriteAllText("update.txt", Update, False)
End Sub
Last edited by a moderator: