Quote:
Originally Posted by FG28_Kodiak
Filename is only used in the constructor to give the value to the variable Missionfilename.
|
Does it mean I can initialize variables in this block, replacing e.g. Length with a value I want to assign?
this.MissionLengh = 30;
Ah, it looks like the only purpose of it is to allow data input like here:
Code:
public List<Mis> MissionPool = new List<Mis>()
{
new Mis ("Mission1.mis",SubMissionsPath ,1000.0),
new Mis ("Mission2.mis",SubMissionsPath ,1000.0),
};
So when I create a new Mis I can enter data there from e.g. parsed filename in one line only, not having to use 3 lines like
mi.Missionfilename = ...;
mi.SubMissionsPath = ...;
mi.MissionLengh = ...;
Instead after parsing a file name I can:
Code:
string[] MisParams;
MisParams = (mi.Missionfilename).Split('_');
Mis mi = new Mis (MisParams[1], MisParams[2],MisParams[3]);
Thanks a lot!