Hello
I created a class (call it “Tank”) with around 20 properties. One sub-class is forecast with some more properties. The user should have the choice of one among 5 instantiations of this class (say “Tank1”, “Bidon2”,…). Among the properties, some characterise the “Tank” (eg : volume, content, temperature), others will be computed.
I would like to store the characteristics of each “Tank” in a separate file, something like this :
Tank1.txt
volume = 10
content = water
temperature = 20
Bidon2.txt
volume = 100
content = oil
temperature = 30
This part is already working, as the one which reads the file and separate the lines in 2 variables : PropertyName, PropertyValue
Then, to initiate the “tank”, I thought looping until EOF and allocate the PropertyValue to the appropriate PropertyName, creating a method like this one :
Sub Allocation(TankType as Tank, PropertyName as string, PropertyValue as single)
me.PropertyName = PropertyValue
Return
As you guess, it does’nt work, as PropertyName is not a Tank property.
Your help will be much appreciated.
Patrice
P.S : you may answer in French, if you prefer, as it is my mother tongue