NOT TRUE! mine does not use pointers at all , and all i can say it's decent enough ;P
Yours is not public...
Using pointers will (generally) provide increased performance or make the code easier to write/understand. It's a learning curve but there's no reason to completely avoid pointers like they are the anti christ. They exist for a reason and should be used where applicable.
Using pointers will (generally) provide increased performance or make the code easier to write/understand. It's a learning curve but there's no reason to completely avoid pointers like they are the anti christ. They exist for a reason and should be used where applicable.
you didn't say public sources u said "Most decent C# sources still use pointers..." :P
and am completely avoiding pointers so i can run my source on any machine
you didn't say public sources u said "Most decent C# sources still use pointers..." :P
and am completely avoiding pointers so i can run my source on any machine
Pointers are not machine based. A pointer is pointing to a location in the memory. Pointers are usually faster, because they write/read directly from memory. They aren't safe to use tho, because you can throw anything in them or whatever how you say it, that's why you use them in unsafe context in C#, but in C/C++ etc. you don't have to declare unsafe, because it's not safe anyways.
Pointers are not machine based. A pointer is pointing to a location in the memory. Pointers are usually faster, because they write/read directly from memory. They aren't safe to use tho, because you can throw anything in them or whatever how you say it, that's why you use them in unsafe context in C#, but in C/C++ etc. you don't have to declare unsafe, because it's not safe anyways.
what i meant is if i used pointers, for instance i wont be able to run the source on Linux or so...!
You can run a C# server on mac/Linux via mono if you remove all the P/invokes, unsafe code and other platform specific code (specifically, BinaryReader/Writer, or other logic which does non-endian-aware conversion - assuming Mac on PPC).
They are supported. (Edit) As he said though, endian-ness is still a problem if you're running on a different architecture. And if you're doing packets the bitshift way, you've already screwed that one up.