Membaca data secara perbaris kemudian dari data tersebut kita melakukan perhitungan…
Contoh Code:
Imports System.IO
Public Class frmFee
Private Sub btnGetData_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnGetData.Click
Dim SR As StreamReader
SR = File.OpenText("MyData.txt")
txtNPM.Text = SR.ReadLine
txtNama.Text = SR.ReadLine
txtJK.Text = SR.ReadLine
txtSKS.Text = SR.ReadLine
SR.Close()
lblTotal.Text = CInt(txtSKS.Text) * CInt(txtBiayaPerSKS.Text)
End Sub
End Class
No comments:
Post a Comment