Hi,
In a part of the small app I'm working on, I have to send via asyncstream a string followed by 4 bytes. In fact the bytes I have to send are DateTime.Now which is a long type (8 bytes).
So I have 2 questions. How can I cast DateTime.Now into 4 bytes? And how can I append those bytes to a string and send the whole package via asyncstream?
Edit: Sorry I forgot to mention that I'm using AsyncStreamText.
Thanks everyone.
In a part of the small app I'm working on, I have to send via asyncstream a string followed by 4 bytes. In fact the bytes I have to send are DateTime.Now which is a long type (8 bytes).
So I have 2 questions. How can I cast DateTime.Now into 4 bytes? And how can I append those bytes to a string and send the whole package via asyncstream?
Edit: Sorry I forgot to mention that I'm using AsyncStreamText.
Thanks everyone.