I want to retrieve all documents from an SPDocumentLibrary I've tried this way but then I got stucked
using (SPSite mysite = SPContext.Current.Site)
{
using (SPWeb myweb = mysite.OpenWeb())
{
SPDocumentLibrary myDocLib = (SPDocumentLibrary)myweb.Lists["DocLibrary"];
SPList myList = SPContext.Current.List;
SPFileCollection myFiles = myList.;
foreach (SPListItem myItem in myList.Items)
{
//adding each found file to my SPFileCollection
myFiles.Add(myItem.File);
}
}
}
but the SPFileCollection.Add function takes more than the file argument !