void Create ( string answerFileName)
Parameters | Description |
answerFileName | The path for the answer file needed to start an assembly. If this file does not exist, a new file will be created. If the path does exist then the file will be opened. If this parameter is an empty string ("") then no file will be used and the AnswerCollection will only exist as long as it is in memory. An AnswerCollection object created in this manner can later be saved to a file using the Save method. |
The following Visual C# example creates a new AnswerCollectionobject 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(); } }