Validating numeric answer in List question

I need to validate the numeric entry in a list question for my ED Listing questionnaire that is used as the source for my roster.
I have a variable which is the current count for the building (cur_bld).

I tried the following code to accomplish this

cur_bld > 1 ?

(new Func(() =>
{

var cur = self.Select(x => int.Parse(x.Item2));
var nxt = next_dwl;
var d = cur-nxt;

return d==1;

})).Invoke()
:
true

I am now learing C# so not sure where I went wrong

Neville

Typical levels for our listing record
Building
Dwelling
Household
Business
Institution
Other Building Types

A sample of a listing could be as below:

Building Dwelling Household
1 1 1
2 2 2
3
4 3 3
4 4 4
4 4 5
5
6 5
6 6 6
6 7 7

Building 3 and 5 are Vacant. In building 6, dwelling 5 the household is vacant so it doesn’t get a number.

I modified the test listing application for my needs and it can do the above situation. I have a variable that calculates the next number but I cannot validate the new listing number eg example

For building 4 dwelling 3 the next household number should be 3, I haven’t figured out how to code the following :
Validation condition is pseudo code:

If next_dwelling > 0
Test ( next_dwelling minus current_dwelling = 1)

I was hoping the code would be something like the following

If Next_dwl > 0
T = next_dwl – Parse.int(@rowname) = 1
I haven’t figured out how to write the if condition to trigger the error.

Any help will be greatly appreciated.