hey all,
i'm working on a code that i want to start creating new classes with but i want to know if there's a more direct way to send the variables used in the form to a new class for storage.
for example i've got this on a form...
Dim ClassID As String
Dim ClassName As String
Dim Grade As String
Dim Exercise As String
Dim file As String = "C:\Users\Ein05\Documents\Visual Studio 2008\Projects\GradeListApplication\GradeListApplication\Grades.txt"
ClassID = xClassIDTextBox.Text
ClassName = xStudentIDTextBox.Text
Exercise = xExerciseTextBox.Text
Grade = xGradeTextBox.Text
My.Computer.FileSystem.WriteAllText(file, ControlChars.NewLine, True)
My.Computer.FileSystem.WriteAllText(file, "Class ID: ", True)
My.Computer.FileSystem.WriteAllText(file, ClassID, True)
My.Computer.FileSystem.WriteAllText(file, ControlChars.NewLine, True)
My.Computer.FileSystem.WriteAllText(file, " Class Name: ", True)
My.Computer.FileSystem.WriteAllText(file, ClassName, True)
My.Computer.FileSystem.WriteAllText(file, ControlChars.NewLine, True)
My.Computer.FileSystem.WriteAllText(file, " Exercise: ", True)
My.Computer.FileSystem.WriteAllText(file, Exercise, True)
My.Computer.FileSystem.WriteAllText(file, ControlChars.NewLine, True)
My.Computer.FileSystem.WriteAllText(file, " Grade: ", True)
My.Computer.FileSystem.WriteAllText(file, Grade, True)
My.Computer.FileSystem.WriteAllText(file, ControlChars.NewLine, True)
My.Computer.FileSystem.WriteAllText(file, ControlChars.NewLine, True)
xClassIDTextBox.Text = String.Empty
xStudentIDTextBox.Text = String.Empty
xExerciseTextBox.Text = String.Empty
xGradeTextBox.Text = String.Empty
but now i want to create a class called Class (i know... creative right)
but i want to assign all of the variables as like properties and be able to sort of categorize them. so if the user enters more than 1 class the stored info will be like.
class 1: eng 101
class 2: eng 202
you know? so what would be my most direct route to get this?
and i want to UNDERSTAND so please critique me... but TEACH me as well. (for any snark comments out there)
thanx