FileCollection.Clear Method
This method removes all file names from the FileCollection.
Syntax
void Clear( )
Example Code (C#):
//This example adds three files to a FileCollection, then removes them. HotDocs_Online.FileCollection fc = new HotDocs_Online.FileCollection(); fc.Add("c:\\temp\\File1.docx"); fc.Add("c:\\temp\\File2.docx"); fc.Add("c:\\temp\\File3.docx"); fc.Clear();
Example Code (Visual Basic):
' This example adds two files to a file collection and then displays the number ' of files in the collection. Then it clears the collection and displays the ' updated count indicating that it is empty. Dim fc Set fc = Server.CreateObject("HotDocs_Online.FileCollection") fc.Add "c:\inetpub\wwwroot\files\demoempl.docx" fc.Add "c:\inetpub\wwwroot\files\clauses.docx" Response.Write fc.Count & "<br>" fc.Clear Response.Write fc.Count