AnswerCollection.Close Method

If an AnswerCollection is backed by an answer file on disk, the answer file is kept open while the AnswerCollection object is in use. This method closes the answer file on disk.

Syntax

void Close ( )

Example

The following Visual C# example creates a new AnswerCollection object for a given answer file and displays the number of answers stored in the file:

public class ExampleCode
{
    static void Main()
    {
        HotDocs.AnswerCollection asc = new HotDocs.AnswerCollection();
        asc.Create(@"C:\Documents\HotDocs\Answers\AnswerFile.anx"); 
        Console.WriteLine("The answer file has " + asc.Count.ToString() + " answers.");
         
        asc.Close(); 
    }
}