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

C#

 
GeneralRe: Storing Info Between Events Pin
ignrod23-Jun-12 4:16
ignrod23-Jun-12 4:16 
GeneralRe: Storing Info Between Events Pin
Richard MacCutchan23-Jun-12 4:40
mveRichard MacCutchan23-Jun-12 4:40 
GeneralRe: Storing Info Between Events Pin
Dave Kreskowiak23-Jun-12 3:47
mveDave Kreskowiak23-Jun-12 3:47 
AnswerRe: Storing Info Between Events Pin
Luc Pattyn23-Jun-12 4:08
sitebuilderLuc Pattyn23-Jun-12 4:08 
GeneralRe: Storing Info Between Events Pin
Richard MacCutchan23-Jun-12 4:45
mveRichard MacCutchan23-Jun-12 4:45 
AnswerRe: Storing Info Between Events Pin
Luc Pattyn23-Jun-12 4:55
sitebuilderLuc Pattyn23-Jun-12 4:55 
GeneralRe: Storing Info Between Events Pin
Richard MacCutchan23-Jun-12 5:08
mveRichard MacCutchan23-Jun-12 5:08 
AnswerRe: Storing Info Between Events Pin
Luc Pattyn23-Jun-12 5:11
sitebuilderLuc Pattyn23-Jun-12 5:11 
GeneralRe: Storing Info Between Events Pin
Richard MacCutchan23-Jun-12 5:14
mveRichard MacCutchan23-Jun-12 5:14 
GeneralRe: Storing Info Between Events Pin
Dave Kreskowiak23-Jun-12 5:37
mveDave Kreskowiak23-Jun-12 5:37 
AnswerRe: Storing Info Between Events Pin
Luc Pattyn23-Jun-12 4:04
sitebuilderLuc Pattyn23-Jun-12 4:04 
GeneralRe: Storing Info Between Events Pin
ASPnoob23-Jun-12 7:24
ASPnoob23-Jun-12 7:24 
GeneralRe: Storing Info Between Events Pin
Dave Kreskowiak23-Jun-12 9:56
mveDave Kreskowiak23-Jun-12 9:56 
AnswerRe: Storing Info Between Events Pin
Luc Pattyn23-Jun-12 10:48
sitebuilderLuc Pattyn23-Jun-12 10:48 
GeneralRe: Storing Info Between Events Pin
ignrod27-Jun-12 1:11
ignrod27-Jun-12 1:11 
QuestionConverting BindingSource and Guid [solved] Pin
Midnight Ahri22-Jun-12 17:11
Midnight Ahri22-Jun-12 17:11 
AnswerRe: Converting BindingSource and Guid Pin
OriginalGriff22-Jun-12 19:50
mveOriginalGriff22-Jun-12 19:50 
AnswerRe: Converting BindingSource and Guid Pin
Midnight Ahri22-Jun-12 20:08
Midnight Ahri22-Jun-12 20:08 
GeneralRe: Converting BindingSource and Guid Pin
OriginalGriff22-Jun-12 20:24
mveOriginalGriff22-Jun-12 20:24 
QuestionListbox Pin
Dirk Higbee22-Jun-12 12:57
Dirk Higbee22-Jun-12 12:57 
AnswerRe: Listbox Pin
OriginalGriff22-Jun-12 19:52
mveOriginalGriff22-Jun-12 19:52 
GeneralRe: Listbox Pin
Dirk Higbee23-Jun-12 7:30
Dirk Higbee23-Jun-12 7:30 
QuestionHow to split byte[] to string & bytes Pin
caspidoron22-Jun-12 8:53
caspidoron22-Jun-12 8:53 
AnswerRe: How to split byte[] to string & bytes Pin
Ian Shlasko22-Jun-12 9:00
Ian Shlasko22-Jun-12 9:00 
If you know the exact length of each text field, this is pretty easy to do.
C#
using System.Text;
// ...
string name = Encoding.ASCII.GetString(byteArray, 0, nameFieldLength)
string message = Encoding.ASCII.GetString(byteArray, nameFieldLength, messageFieldLength)

Then getting the image itself depends on whether you're working in WinForms or WPF, but either one lets you load a bitmap image from a byte array.

If you're going to use variable-length fields, then you'll need some kind of delimiter to tell you which bytes to grab, and it gets slightly more complex.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)

AnswerRe: How to split byte[] to string & bytes Pin
Richard Andrew x6422-Jun-12 9:02
professionalRichard Andrew x6422-Jun-12 9:02 

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.