I am reading data from an INI file. INI file look like this
[config]
TotalElements=16
#Special Case only elements
ElementNo1=9
ElementNo2=10
ElementNo3=11
ElementNo4=12
#
ElementNo5=2,17
ElementNo6=2,18
ElementNo7=2,19
ElementNo8=2,20
#
ElementNo9=3,17
ElementNo10=3,18
ElementNo11=3,19
ElementNo12=3,20
#
# Special Case only Elements
ElementNo13=9
ElementNo14=10
ElementNo15=11
ElementNo16=12
I am reading the Data from file like this
Dim inifile As New IniFile()
inifile.Load(filePath)
ElementValue = inifile.Sections("config").Keys("TotalElements").Value
For i = 1 To totalElement
elementValue = iniSetting.Sections("config").Keys("ElementNo" & i)Value
ListOfElementNumbers.Add(New ElementMapping With {.ElementNumber = i, .ElementValue =
ElementValue, .specialElement = SpecialElement.SpecialElementValue})
Next
Data Structure Look like this
Public Class ElementMapping
Public ElementNumber As Integer
Public ElementValue As Integer
Public specialElement As SpecialElement
End Class
Public Enum SpecialElement
SpecialElementValue
End Enum
Now What i want to do is when i am reading the INI file when the Comment "#Special Case only elements" Comes from next line until the "#" Comes again i want to assign this to Enum in my data structure. And if this comment somewhere in the file again i want to do the same for that special data as well. I am using "MadMilkman.Ini" Library to read the data from Ini file.