Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to create xml file in disk location using SQL Server 2005 & C#...? Pin
Richard MacCutchan12-Jun-11 23:46
mveRichard MacCutchan12-Jun-11 23:46 
AnswerRe: How to create xml file in disk location using SQL Server 2005 & C#...? Pin
jschell13-Jun-11 8:43
jschell13-Jun-11 8:43 
QuestionGetting data from host, convert to string and then to bytes again. Pin
krosty478212-Jun-11 13:06
krosty478212-Jun-11 13:06 
AnswerRe: Getting data from host, convert to string and then to bytes again. Pin
Luc Pattyn12-Jun-11 13:42
sitebuilderLuc Pattyn12-Jun-11 13:42 
GeneralRe: Getting data from host, convert to string and then to bytes again. Pin
krosty478212-Jun-11 15:07
krosty478212-Jun-11 15:07 
AnswerRe: Getting data from host, convert to string and then to bytes again. Pin
Luc Pattyn12-Jun-11 15:21
sitebuilderLuc Pattyn12-Jun-11 15:21 
GeneralRe: Getting data from host, convert to string and then to bytes again. Pin
krosty478215-Jun-11 12:53
krosty478215-Jun-11 12:53 
AnswerRe: Getting data from host, convert to string and then to bytes again. Pin
Luc Pattyn12-Jun-11 15:34
sitebuilderLuc Pattyn12-Jun-11 15:34 
Actually, there is more to it than what I said earlier. If the NetworkStream remains open and you send another file, it will look like more bytes coming through the cable, and the receiver will not know where the first file ends and the second one begins. You do need something extra to carry that information.

If the length is known in advance, as when sending a file from disk, then you could put a writer.Write(fs.Length); in front of the data copying loop. Your receiver should then read than length and loop until it has read that many bytes. At that point either the transmission is over or another file is coming.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Please use <PRE> tags for code snippets, they improve readability.
CP Vanity has been updated to V2.4

GeneralRe: Getting data from host, convert to string and then to bytes again. Pin
BobJanova13-Jun-11 0:05
BobJanova13-Jun-11 0:05 
QuestionUsing Cobol Copy Books Pin
MumbleB11-Jun-11 0:53
MumbleB11-Jun-11 0:53 
AnswerRe: Using Cobol Copy Books Pin
PIEBALDconsult11-Jun-11 3:33
mvePIEBALDconsult11-Jun-11 3:33 
AnswerRe: Using Cobol Copy Books Pin
Luc Pattyn11-Jun-11 3:53
sitebuilderLuc Pattyn11-Jun-11 3:53 
GeneralRe: Using Cobol Copy Books Pin
PIEBALDconsult11-Jun-11 6:09
mvePIEBALDconsult11-Jun-11 6:09 
AnswerRe: Using Cobol Copy Books Pin
Luc Pattyn11-Jun-11 6:27
sitebuilderLuc Pattyn11-Jun-11 6:27 
GeneralRe: Using Cobol Copy Books Pin
PIEBALDconsult11-Jun-11 14:03
mvePIEBALDconsult11-Jun-11 14:03 
AnswerRe: Using Cobol Copy Books Pin
Not Active11-Jun-11 5:29
mentorNot Active11-Jun-11 5:29 
GeneralRe: Using Cobol Copy Books Pin
MumbleB11-Jun-11 6:53
MumbleB11-Jun-11 6:53 
AnswerRe: Using Cobol Copy Books Pin
DaveyM6911-Jun-11 10:19
professionalDaveyM6911-Jun-11 10:19 
QuestionPrintPreviewControl and HTML Pin
dSolariuM10-Jun-11 23:36
dSolariuM10-Jun-11 23:36 
AnswerRe: PrintPreviewControl and HTML Pin
Luc Pattyn11-Jun-11 0:11
sitebuilderLuc Pattyn11-Jun-11 0:11 
GeneralRe: PrintPreviewControl and HTML Pin
MumbleB11-Jun-11 1:19
MumbleB11-Jun-11 1:19 
GeneralRe: PrintPreviewControl and HTML Pin
dSolariuM12-Jun-11 2:32
dSolariuM12-Jun-11 2:32 
GeneralRe: PrintPreviewControl and HTML Pin
dSolariuM12-Jun-11 2:33
dSolariuM12-Jun-11 2:33 
AnswerRe: PrintPreviewControl and HTML Pin
Luc Pattyn12-Jun-11 2:55
sitebuilderLuc Pattyn12-Jun-11 2:55 
GeneralRe: PrintPreviewControl and HTML Pin
BobJanova12-Jun-11 22:11
BobJanova12-Jun-11 22:11 

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.