StreamExtensionsGetBytes Method |
Reads and returns the bytes from the given stream.
Namespace:
Ptv.XServer.Controls.Map.Tools
Assembly:
Ptv.XServer.Controls.Map (in Ptv.XServer.Controls.Map.dll) Version: 1.7.10.0
Syntax public static byte[] GetBytes(
this Stream stm,
bool forceNullIfEmpty = false
)
<ExtensionAttribute>
Public Shared Function GetBytes (
stm As Stream,
Optional forceNullIfEmpty As Boolean = false
) As Byte()
public:
[ExtensionAttribute]
static array<unsigned char>^ GetBytes(
Stream^ stm,
bool forceNullIfEmpty = false
)
[<ExtensionAttribute>]
static member GetBytes :
stm : Stream *
?forceNullIfEmpty : bool
(* Defaults:
let _forceNullIfEmpty = defaultArg forceNullIfEmpty false
*)
-> byte[]
Parameters
- stm
- Type: System.IOStream
Stream to get the bytes from. - forceNullIfEmpty (Optional)
- Type: SystemBoolean
If set to true, forces null to be returned if the stream is empty.
Return Value
Type:
ByteBytes read.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Stream. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also