silly question about access violations

  • Thread starter Thread starter Willem Voncken
  • Start date Start date
W

Willem Voncken

Hi guys,

might be a silly question, but i'm wondering whether it is even possible to
generate access violations when using C#?

I'm new at c# programming, but i have some experience with c++. Now that i'm
using c# i can't see how i should mess up memory like that without the use
of pointers or adresses.

Regards, Willem
 
Hello, Willem!

WV> might be a silly question, but i'm wondering whether it is even
WV> possible to generate access violations when using C#?

WV> I'm new at c# programming, but i have some experience with c++. Now
WV> that i'm using c# i can't see how i should mess up memory like that
WV> without the use of pointers or adresses.

IMO you can do that using P/Invoke and COM interop in the unproper way and
maybe if you mess up something in the unsafe block...

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Hi,

It's much more difficult, but possible if using P/invoke.

The more common problem (not sure if quilify as access violations) is when
you try to invoke a member of an instance without being assigned first
 
Back
Top