1
Reply

Does direct memory manipulation is an unsafe operations, if yes, how?

Manish Tewatia

Manish Tewatia

13y
4.1k
0
Reply

    Yes, direct memory manipulation is an unsafe operation in .NET because the CLR can't be sure what effect direct writes to memory will have on existing structures and so can't give any guarantees about its safety. This is why any code that uses unmanaged pointers needs to be marked as 'unsafe' when using C#.