Click here to Skip to main content
15,905,419 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to Stop the Form from Closing... Pin
Luc Pattyn22-Jul-07 11:05
sitebuilderLuc Pattyn22-Jul-07 11:05 
GeneralRe: How to Stop the Form from Closing... Pin
max2929722-Jul-07 11:19
max2929722-Jul-07 11:19 
GeneralRe: How to Stop the Form from Closing... Pin
Luc Pattyn22-Jul-07 17:35
sitebuilderLuc Pattyn22-Jul-07 17:35 
GeneralRe: How to Stop the Form from Closing... Pin
max2929723-Jul-07 8:03
max2929723-Jul-07 8:03 
QuestionDeleting items from ListView Pin
Saikek22-Jul-07 9:33
Saikek22-Jul-07 9:33 
AnswerRe: Deleting items from ListView Pin
Ravi Bhavnani22-Jul-07 13:34
professionalRavi Bhavnani22-Jul-07 13:34 
AnswerRe: Deleting items from ListView Pin
sidbaruah22-Jul-07 20:27
sidbaruah22-Jul-07 20:27 
QuestionProblem with getting string from bytes Pin
nc3b22-Jul-07 8:09
nc3b22-Jul-07 8:09 
Ok here is the problem. I am developing a server in C and a client in C#. The server send streams of data to the client, and the client is responsible for decoding and interpreting these stream. So, if I send a simple "Hello world" from the server to the client, it works. If I send a byte representing an integer (I use memcpy) I can decode it in the client. But, the problems start when after some integers, I also put a string. If I put 2 bytes, each representing some number, I am still able to decode the string that follows using:

System.Text.Encoding.ASCII.GetString(buffer,2,length)

But if I say 3 bytes, and then the string, I don't get anything (yes, I said buffer,3,length to reflect the server changes), I get garbage.. Can anyone please help me? Thank you.
AnswerRe: Problem with getting string from bytes Pin
Guffa22-Jul-07 9:05
Guffa22-Jul-07 9:05 
GeneralRe: Problem with getting string from bytes Pin
nc3b22-Jul-07 10:49
nc3b22-Jul-07 10:49 
GeneralRe: Problem with getting string from bytes Pin
Luc Pattyn22-Jul-07 11:03
sitebuilderLuc Pattyn22-Jul-07 11:03 
GeneralRe: Problem with getting string from bytes Pin
nc3b22-Jul-07 11:20
nc3b22-Jul-07 11:20 
GeneralRe: Problem in server or client. Pin
Luc Pattyn22-Jul-07 11:57
sitebuilderLuc Pattyn22-Jul-07 11:57 
AnswerRe: Problem with getting string from bytes Pin
Guffa22-Jul-07 12:40
Guffa22-Jul-07 12:40 
GeneralRe: Problem with getting string from bytes Pin
nc3b22-Jul-07 22:58
nc3b22-Jul-07 22:58 
AnswerRe: Problem with getting string from bytes Pin
Guffa23-Jul-07 0:40
Guffa23-Jul-07 0:40 
GeneralRe: Problem with getting string from bytes Pin
nc3b23-Jul-07 0:45
nc3b23-Jul-07 0:45 
QuestionSkinned Controls Pin
Mahmoud Zidan22-Jul-07 6:40
Mahmoud Zidan22-Jul-07 6:40 
QuestionListing User Accounts Pin
CeleryGod22-Jul-07 4:16
CeleryGod22-Jul-07 4:16 
AnswerRe: Listing User Accounts Pin
mav.northwind22-Jul-07 6:41
mav.northwind22-Jul-07 6:41 
Questionwhich constructor gets called first? Pin
jon-8022-Jul-07 2:40
professionaljon-8022-Jul-07 2:40 
AnswerRe: which constructor gets called first? Pin
Luc Pattyn22-Jul-07 2:52
sitebuilderLuc Pattyn22-Jul-07 2:52 
GeneralRe: which constructor gets called first? Pin
jon-8022-Jul-07 3:18
professionaljon-8022-Jul-07 3:18 
GeneralRe: which constructor gets called first? Pin
Luc Pattyn22-Jul-07 3:35
sitebuilderLuc Pattyn22-Jul-07 3:35 
GeneralRe: which constructor gets called first? Pin
Paul Conrad22-Jul-07 5:34
professionalPaul Conrad22-Jul-07 5:34 

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.