J
Jay
I want to store various text settings in a configuration file, that I will read into C# and make use
of. Here's a simplified example of the file:
#comment
loop(var=1:5){
deviceundertest freq:5.6e6 power:3.7
analyser freq:5.6e6 span:1e3 resbw:100 atten:20
}
As you can see, the configuration file will define:
- comments, which start with the # character
- looping - the loop line effectively means for(int var=1; var<=5; var++){ }
- equpment settings (eg analyser is the name of some equipments, and what follows are parameters
that are sent to the equipment)
There is no requirement to write this file from C# - it will be written and edited in (eg) Notepad.
Is there any support within C# and .net for this type of file, or should I simply read it as a text
file and parse it with my own code? I thought I'd ask the question before I start to write the
parsing code.
Thank everyone...
of. Here's a simplified example of the file:
#comment
loop(var=1:5){
deviceundertest freq:5.6e6 power:3.7
analyser freq:5.6e6 span:1e3 resbw:100 atten:20
}
As you can see, the configuration file will define:
- comments, which start with the # character
- looping - the loop line effectively means for(int var=1; var<=5; var++){ }
- equpment settings (eg analyser is the name of some equipments, and what follows are parameters
that are sent to the equipment)
There is no requirement to write this file from C# - it will be written and edited in (eg) Notepad.
Is there any support within C# and .net for this type of file, or should I simply read it as a text
file and parse it with my own code? I thought I'd ask the question before I start to write the
parsing code.
Thank everyone...