I'm trying a simple comparison here, assignment doesn't work as i would like... here is the code,
int returnDateIndex(Paragraph para)
{
long firstIndex = 0;
for (int i = 0; i < para.Words.Count; i++)
{
if (para.Words[i].Text == "Second")
{
if (para.Words[i - 1].Text == "First")
{
firstIndex = para.Words[i].FirstSymbolPosition;
}
}
}
return (int)firstIndex;
}
I ran my debugger (In VS) and when that assignment is called, the int on the right was equal to 50, but the int on the left stayed equal to 0. No idea what I'm missing.
This application is using the Abbyy FineReader 9.0 SDK and the documentation for FirstSymbolPosition says it returns a read-only Long
EDIT: the code has been stripped of all features to make it easier for viewers to see where the problem is. I would appreciate answers for the original questions and anything else with the code that is bugging you as a comment please.