Is a MemoryStream passed as a parameter reused or is a new one created?

I return a stream for a file I download from OneDrive. There are a few things I need to do to this file in memory before uploading back to onedrive. I have these items done as separate functions to keep the controllers code more compact. My issue is I am struggling how the MemoryStream object… Read More Is a MemoryStream passed as a parameter reused or is a new one created?

MemoryStream Uploading Empty File to SharePoint in C# MVC Project

I am testing out the ability to upload a file to SharePoint. I am using the following code: var targetSiteURL = @"https://company.sharepoint.com/sites/ProjectRoom"; var login = "user@company.com"; var password = "PWD123!"; var securePassword = new SecureString(); foreach (var c in password) { securePassword.AppendChar(c); } var ctx = new ClientContext(targetSiteURL) { Credentials = new SharePointOnlineCredentials(login, securePassword) };… Read More MemoryStream Uploading Empty File to SharePoint in C# MVC Project