Question Import .yml file to form

tototo583

New member
Joined
Aug 23, 2012
Messages
2
Programming Experience
Beginner
i want to import a .yml file to a form but when i try to debug it it gives me this error
VB.NET:
Property access must assign to the property or use its value.
this it the code relevant to that part:
VB.NET:
    Private Sub Open_File_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Open_File.Click
        If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
            Src.Text(OpenFileDialog1.FileName)
        End If
    End Sub
End Class
 
What exactly are you expecting to happen there? Presumably you want to open the file and display the the contents in Src, which I guess is a TextBox. In that case, it would be a good idea to open the file. The simplest way to get the text from a file is by calling the File.ReadAllText method. As the error message says, yo then have to assign the result to that Text property.
 
What exactly are you expecting to happen there? Presumably you want to open the file and display the the contents in Src, which I guess is a TextBox. In that case, it would be a good idea to open the file. The simplest way to get the text from a file is by calling the File.ReadAllText method. As the error message says, yo then have to assign the result to that Text property.
How to i do that? i am just starting to learn visual basic
 
Back
Top