Small syntax question
- From: Zaza <xnopre@xxxxxxxxxxx>
- Date: Wed, 24 Sep 2008 01:04:28 -0700 (PDT)
Hi,
I'm not expert with C# (I'm more with Java and C++). I have to work
with an existing C# code. And I have a question about this lines :
...
TCP_DATAHEADER buffer = (TCP_DATAHEADER) asyncState.buffer;
Array.Copy(asyncState.buffer, buffer.cbHeader, asyncState.buffer,
0, buffer.dwBytes - buffer.cbHeader);
string dwType = buffer.dwType;
...
What does the first line do ? A simple cast or a copy ? I think it is
a copy, because the line 2 make a copy overwriting the initiale data,
and the line 3 seems to asses to this original data ...
But I'm not sure, it's strange ...
Thanks,
Xavier
.
- Follow-Ups:
- Re: Small syntax question
- From: Jon Skeet [C# MVP]
- Re: Small syntax question
- Prev by Date: Re: Images: Dynamic Resize? Quality?
- Next by Date: Re: Typed dataset and adapters
- Previous by thread: Re: JIT Debugging
- Next by thread: Re: Small syntax question
- Index(es):