Pārlūkot izejas kodu

Merge pull request #4 from CPonty/patch-3

#3 : Implemented DocX.Copy() for 'Provide a copy constructor for DocX'
master
PrzemyslawKlys pirms 10 gadiem
vecāks
revīzija
c538c1a312
1 mainītis faili ar 19 papildinājumiem un 0 dzēšanām
  1. 19
    0
      DocX/DocX.cs

+ 19
- 0
DocX/DocX.cs Parādīt failu

@@ -2555,6 +2555,25 @@ namespace Novacode
}
}
/// <summary>
/// Saves and copies the document into a new DocX object
/// </summary>
/// <returns>
/// Returns a new DocX object with an identical document
/// </returns>
/// <example>
/// <seealso cref="DocX.Load(System.IO.Stream)"/>
/// <seealso cref="DocX.Save()"/>
/// </example>
public DocX Copy()
{
MemoryStream ms = new MemoryStream();
SaveAs(ms);
ms.Seek(0, SeekOrigin.Begin);
return DocX.Load(ms);
}
/// <summary>
/// Loads a document into a DocX object using a Stream.
/// </summary>

Notiek ielāde…
Atcelt
Saglabāt