Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Add Method (String, Stream)

SPFileCollection.Add Method (String, Stream)

Windows SharePoint Services 3

Creates a file in the collection based on the specified URL and on a Stream object that contains a file.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public SPFile Add(
	string urlOfFile,
	Stream stream


Type: System.String
A string that specifies the URL for the file.
Type: System.IO.Stream
A System.IO.Stream object that contains the file.

Return Value

Type: Microsoft.SharePoint.SPFile
An SPFile object that represents the file.

Community Additions

© 2015 Microsoft