Click here to Skip to main content
15,502,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to create a many-to-many relationship between users in a table? Pin
Eddy Vluggen17-Sep-22 0:59
professionalEddy Vluggen17-Sep-22 0:59 
SuggestionRe: How to create a many-to-many relationship between users in a table? Pin
Richard Deeming19-Sep-22 22:16
mveRichard Deeming19-Sep-22 22:16 
QuestionProgram instalator in C#, Visual Studio Pin
Ismael_199912-Sep-22 6:36
Ismael_199912-Sep-22 6:36 
AnswerRe: Program instalator in C#, Visual Studio Pin
Gerry Schmitz12-Sep-22 7:21
mveGerry Schmitz12-Sep-22 7:21 
AnswerRe: Program instalator in C#, Visual Studio Pin
OG MAYOR MRL25-Sep-22 3:48
OG MAYOR MRL25-Sep-22 3:48 
Questionreading memory stream in byte chunks Pin
mjeeves10-Sep-22 9:41
mjeeves10-Sep-22 9:41 
GeneralRe: reading memory stream in byte chunks Pin
harold aptroot10-Sep-22 10:49
harold aptroot10-Sep-22 10:49 
GeneralRe: reading memory stream in byte chunks Pin
mjeeves10-Sep-22 11:04
mjeeves10-Sep-22 11:04 
sure enough _memoryStream.Read(readChunkSize, 0, 4); fixed part of the problem and also changing the Write message as below fixed the issue.

but I want to use BinaryReader since I'm using BinaryWriter

the behavior I'm seeing is I can consecutively call ReadByte and it will read each byte in turn without me having to define position within the stream, which I don't understand.

so how do is use BinaryReader to read specific blocks of bytes, 2->6, and 7->19

thanks

Madaxe

public void WriteMessage(string message)
{
    WriteNextChunckSize(message.Length);
    byte[] byteArray = Encoding.UTF8.GetBytes(message);
    BinaryWriter.Write(byteArray);
}

GeneralRe: reading memory stream in byte chunks Pin
harold aptroot10-Sep-22 11:15
harold aptroot10-Sep-22 11:15 
QuestionC# Service: Error 1053: The service did not respond to the start or control request in a timely fashion Pin
temuco8-Sep-22 21:41
professionaltemuco8-Sep-22 21:41 
AnswerRe: C# Service: Error 1053: The service did not respond to the start or control request in a timely fashion Pin
Richard Deeming8-Sep-22 22:49
mveRichard Deeming8-Sep-22 22:49 
GeneralRe: C# Service: Error 1053: The service did not respond to the start or control request in a timely fashion Pin
temuco8-Sep-22 23:34
professionaltemuco8-Sep-22 23:34 
General[Solved] Re: C# Service: Error 1053: The service did not respond to the start or control request in a timely fashion Pin
temuco9-Sep-22 2:38
professionaltemuco9-Sep-22 2:38 
QuestionC# Battleship gameboard & random assignment Pin
Otto_W5-Sep-22 18:50
Otto_W5-Sep-22 18:50 
AnswerRe: C# Battleship gameboard & random assignment Pin
OriginalGriff5-Sep-22 20:11
mveOriginalGriff5-Sep-22 20:11 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W6-Sep-22 16:51
Otto_W6-Sep-22 16:51 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff6-Sep-22 20:19
mveOriginalGriff6-Sep-22 20:19 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W16-Sep-22 22:54
Otto_W16-Sep-22 22:54 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff16-Sep-22 23:13
mveOriginalGriff16-Sep-22 23:13 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W24-Sep-22 2:09
Otto_W24-Sep-22 2:09 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff24-Sep-22 2:34
mveOriginalGriff24-Sep-22 2:34 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W24-Sep-22 3:45
Otto_W24-Sep-22 3:45 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff24-Sep-22 4:16
mveOriginalGriff24-Sep-22 4:16 
GeneralRe: C# Battleship gameboard & random assignment Pin
Otto_W25-Sep-22 22:20
Otto_W25-Sep-22 22:20 
GeneralRe: C# Battleship gameboard & random assignment Pin
OriginalGriff25-Sep-22 23:01
mveOriginalGriff25-Sep-22 23:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.