C# Delete test by ID
/*
  How to call:
     //Delete by ID
     DeleteTest(11);
     //Delete by Test
     TestFactory tempTestF = (TestFactory)tdConnection.TestFactory;
     Test tempTest = (Test)tempTestF[10];
     DeleteTest(tempTest); 
 */
public bool DeleteTest(object theTest)
{
  try
  {
    TestFactory testF;
    Int64 tID;

    if (theTest is Test)
    {
      var t = (Test)theTest;
      tID = Convert.ToInt64(t.ID);
    }
    else
    {
      tID = Convert.ToInt64(theTest);
    }
    testF = tdConnection.TestFactory;
    testF.RemoveItem(tID);
    return true;
  }
  catch (Exception)
  {
    return false;
  }
}