Call CTRecord.First() to position the current record at the first record of a table. If the table is empty (i.e., the table contains no records, CTRecord.First() returns false).
// get the first record of the table
try
{
if (ARecord.First())
Console.Write("First record found\n");
else
Console.Write("Table is empty\n");
}
catch (CTException err)
{
Console.Write("First record failed with error {0}\n", err.GetErrorCode());
}