I have a fairly complex class to handle deserialization of an XML file. I wish to place a [class].loadfile method within the class. It looks something like this:
Serialization decoration left out for simplicity...
Expand|Select|Wrap|Line Numbers
- Public MyClass
- Property datatype as new cls_datatype
- Property data as new cls_data
- Public Sub LoadFile(byVal Filename as String)
- If My.Computer.FileSystem.FileExists(Filename)then
- Dim XMLString as String = My.Computer.FileSystem.ReadAllText(Filename)
- Me = Deserialize(XMLString, Gettype(datatable))
- Else
- Throw New ArguementException("File not found!")
- End if
- End Sub
- End Class
Any help would be greatly appreciated!