I'm trying to loop through a row of data for a set amount of times to access a different property every time.
The data looks like this:
    [JsonProperty("Afbeelding")]
    public string Afbeelding { get; set; }
    [JsonProperty("Afbeelding_2")]
    public string Afbeelding2 { get; set; }
    [JsonProperty("Afbeelding_3")]
    public string Afbeelding3 { get; set; }
    [JsonProperty("Afbeelding_4")]
    public string Afbeelding4 { get; set; }
    [JsonProperty("Afbeelding_5")]
    public string Afbeelding5 { get; set; }
    [JsonProperty("Afbeelding_6")]
    public string Afbeelding6 { get; set; }
    [JsonProperty("Afbeelding_7")]
    public string Afbeelding7 { get; set; }
I've tried the folllowing in the loop:
var path = CreateFile(profitImageRow.("Afbeelding"+i), profitImageRow.Bestandsnaam+i);
The first one does not compile while the second one only adds i to the value of "Bestandsnaam"
Is there any way to make this work in a loop?
 
     
    