StreamContent Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new instance of the StreamContent class.
Overloads
StreamContent(Stream) |
Creates a new instance of the StreamContent class. |
StreamContent(Stream, Int32) |
Creates a new instance of the StreamContent class. |
StreamContent(Stream)
- Source:
- StreamContent.cs
- Source:
- StreamContent.cs
- Source:
- StreamContent.cs
Creates a new instance of the StreamContent class.
public:
StreamContent(System::IO::Stream ^ content);
public StreamContent (System.IO.Stream content);
new System.Net.Http.StreamContent : System.IO.Stream -> System.Net.Http.StreamContent
Public Sub New (content As Stream)
Parameters
- content
- Stream
The content used to initialize the StreamContent.
Remarks
The StreamContent object calls Dispose() on the provided Stream object when StreamContent.Dispose is called.
Applies to
StreamContent(Stream, Int32)
- Source:
- StreamContent.cs
- Source:
- StreamContent.cs
- Source:
- StreamContent.cs
Creates a new instance of the StreamContent class.
public:
StreamContent(System::IO::Stream ^ content, int bufferSize);
public StreamContent (System.IO.Stream content, int bufferSize);
new System.Net.Http.StreamContent : System.IO.Stream * int -> System.Net.Http.StreamContent
Public Sub New (content As Stream, bufferSize As Integer)
Parameters
- content
- Stream
The content used to initialize the StreamContent.
- bufferSize
- Int32
The size, in bytes, of the buffer for the StreamContent.
Exceptions
The content
was null
.
The bufferSize
was less than or equal to zero.
Remarks
The StreamContent object calls Dispose() on the provided Stream object when StreamContent.Dispose is called.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om