![]() |
Class problem
I have a problem in that I have created this class below it is designed to allow the user to set the full path to a file and store that data in the variable fullPath, but when I try to retreive that data in the fullPath variable and try to use it in the main program
Quote:
Quote:
Can any one help? |
Hi,
I am not quite sure what you are trying to do here exactly...(and I am a novice ..) The FileDetails class has a private string to hold the file address in, but it only seems to have one method... a get (an accessor). If you want to specify the file path wouldn't you need to set it? Also in your main program wouldnt you then need to call on the get method to get that address string? |
I am not sure what you are trying to achieve here. YOu have a property which is read only. So you can not allow a user to set full path through it. you can only get what ever is in the fullpath variable.
If you set it up earlier then there could be some other problems. You have not mentioned what kind of error it is generating. File not found or like that. |
@Iftikhar: This has been mentioned before, but perhaps you don't get it.
Quote:
|
your property in class is read-only! why?
you can make it read-write... :
Property FullPathAndFilename() As String |
| All times are GMT -5. The time now is 8:26 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC