I have a situation where I need to perform some actions based on the child index value of an element. I need to know whether the index is higher or lower than the value of a variable.
varVoice is a string (although i did convert it to an int32 while testing) the childindex is an int
while (repo.MyElement.ChildIndex > varVoice)When I try and run this I get the following error "Operator '>' cannot be applied to operands of type 'int' and 'string'
I expected comparing numbers to each other would be simple but I cant find a way to make it work and my online searches have not presented a solution. Could someone please tell me what I am missing please..?
Many thanks
Ben