Click here to Skip to main content
15,900,973 members
Home / Discussions / C#
   

C#

 
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 
AnswerRe: Struggling with delegates Pin
Martin#14-Jun-07 19:29
Martin#14-Jun-07 19:29 
QuestionHow to read Character from Image Pin
Soosai13-Jun-07 23:59
Soosai13-Jun-07 23:59 
AnswerRe: How to read Character from Image Pin
Russell'14-Jun-07 1:52
Russell'14-Jun-07 1:52 
Questionturn a string into a querystring Pin
tim_gunning13-Jun-07 23:47
tim_gunning13-Jun-07 23:47 
Questioninclude icon to setup project Pin
korsosjosi13-Jun-07 23:20
korsosjosi13-Jun-07 23:20 
AnswerRe: include icon to setup project Pin
Colin Angus Mackay13-Jun-07 23:26
Colin Angus Mackay13-Jun-07 23:26 
GeneralRe: include icon to setup project Pin
korsosjosi13-Jun-07 23:42
korsosjosi13-Jun-07 23:42 
GeneralRe: include icon to setup project Pin
Colin Angus Mackay13-Jun-07 23:46
Colin Angus Mackay13-Jun-07 23:46 
GeneralRe: include icon to setup project Pin
korsosjosi13-Jun-07 23:47
korsosjosi13-Jun-07 23:47 
AnswerRe: include icon to setup project Pin
Hesham Yassin14-Jun-07 8:23
Hesham Yassin14-Jun-07 8:23 

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.