silly question about access violations

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
 
V

Vadym Stetsyak

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
 
I

Ignacio Machin \( .NET/ C# MVP \)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top