I'm new to using LiNQ. I have the following code, which is used to find the order quantity of a part on an invoice object.

```
var invoiceQty = from i in returnInvoices
                 where i.PartNo == returnPart.PartNo && i.InvoiceID == hiddenInvoiceId.Value
                 select i.OrderLineQty;

if (Convert.ToInt32(txtReturnProdQty.Text) > Convert.ToInt32(invoiceQty))
{
    args.IsValid = false;
    SourceValidate.ErrorMessage = "Returned qty cannot be greater than quantity available on the invoice.";
    txtReturnProdQty.Focus();
    return;
}

```

I don't think I'm getting the `OrderLineQty` value correctly for the if statement, as it generates the following error:

```
System.InvalidCastException: Unable to cast object of type  'WhereSelectListIterator`2[Invoice,System.Double]' to type 'System.IConvertible'.

```

Can anyone help me understand how to use the returned value in the LiNQ query?

LiNQ is taking a while to sink in!