Click here to Skip to main content
15,914,452 members
Home / Discussions / C#
   

C#

 
AnswerRe: Copy a directory somewhere Pin
David Knechtges14-Jun-07 2:34
David Knechtges14-Jun-07 2:34 
Questionconvert cyrillic from console app to Unicode C# Pin
drweb8614-Jun-07 1:16
drweb8614-Jun-07 1:16 
QuestionHow to compare two Times [modified] Pin
VenkataRamana.Gali14-Jun-07 1:08
VenkataRamana.Gali14-Jun-07 1:08 
AnswerRe: How to compare two Times Pin
Mali Perica14-Jun-07 1:30
Mali Perica14-Jun-07 1:30 
AnswerRe: How to compare two Times Pin
Martin#14-Jun-07 1:31
Martin#14-Jun-07 1:31 
AnswerRe: How to compare two Times Pin
Muammar©14-Jun-07 1:37
Muammar©14-Jun-07 1:37 
AnswerRe: How to compare two Times Pin
Dewald14-Jun-07 1:45
Dewald14-Jun-07 1:45 
AnswerRe: How to compare two Times Pin
Luc Pattyn14-Jun-07 3:07
sitebuilderLuc Pattyn14-Jun-07 3:07 
AnswerRe: How to compare two Times Pin
andreumv14-Jun-07 3:50
andreumv14-Jun-07 3:50 
GeneralRe: How to compare two Times Pin
Martin#14-Jun-07 4:01
Martin#14-Jun-07 4:01 
AnswerRe: How to compare two Times Pin
Le centriste14-Jun-07 7:21
Le centriste14-Jun-07 7:21 
Questionupload file C# web application Pin
reddyamar_uk14-Jun-07 0:56
reddyamar_uk14-Jun-07 0:56 
AnswerRe: upload file C# web application Pin
giddy_guitarist17-Jun-07 10:16
giddy_guitarist17-Jun-07 10:16 
QuestionQuestion on iterators Pin
Dewald14-Jun-07 0:13
Dewald14-Jun-07 0:13 
AnswerRe: Question on iterators Pin
Colin Angus Mackay14-Jun-07 0:35
Colin Angus Mackay14-Jun-07 0:35 
GeneralRe: Question on iterators Pin
Dewald14-Jun-07 1:28
Dewald14-Jun-07 1:28 
GeneralRe: Question on iterators Pin
Colin Angus Mackay14-Jun-07 2:04
Colin Angus Mackay14-Jun-07 2:04 
GeneralRe: Question on iterators Pin
Dewald14-Jun-07 2:21
Dewald14-Jun-07 2:21 
Fair point. I'm still undecided as to whether I really like this approach. For what I was trying to do, this works perfectly but I'm not sure if it is really a good programming practice.

I am busy porting code from a C++ project to C#. In the C++ project I have a structure with a number of member variables which I'm sending across a TCP socket to a server. The server then responds and the response is copied into another structure.

So what I used to do was to take a pointer of the structure and cast it to a byte array and when the response comes back to take the byte array again and cast it to a pointer to the structure. This was a very quick way of obtaining a stream of bytes from the structure or populating the structure with a stream of bytes but in itself probably not a safe programming practice to start off with. The issues of endianness, memory overflow etc. etc. had to be handled manually and C# is big step towards taking that responsibility off the programmer and managing all of it automatically.

So this "sollution" of mine is probably a step in the opposite direction of what C# have been designed to achieve.

Thanks for the help though.
AnswerRe: Question on iterators Pin
Luc Pattyn14-Jun-07 1:27
sitebuilderLuc Pattyn14-Jun-07 1:27 
GeneralRe: Question on iterators Pin
Dewald14-Jun-07 2:02
Dewald14-Jun-07 2:02 
GeneralRe: Question on iterators Pin
Luc Pattyn14-Jun-07 2:19
sitebuilderLuc Pattyn14-Jun-07 2:19 
GeneralRe: Question on iterators Pin
Le centriste14-Jun-07 7:24
Le centriste14-Jun-07 7:24 
QuestionStruggling with delegates Pin
kbalias14-Jun-07 0:10
kbalias14-Jun-07 0:10 
AnswerRe: Struggling with delegates Pin
Martin#14-Jun-07 1:29
Martin#14-Jun-07 1:29 
GeneralRe: Struggling with delegates Pin
kbalias14-Jun-07 18:51
kbalias14-Jun-07 18:51 

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.