Re: Buffer Overflow Errors
From: Tony Morris (not_at_telling.you)
Date: 07/18/04
- Next message: Troy: "Servlet to Applet Communication -- Cheats"
- Previous message: Liz: "Re: Buffer Overflow Errors"
- In reply to: Liz: "Re: Buffer Overflow Errors"
- Next in thread: blmblm_at_myrealbox.com: "Re: Buffer Overflow Errors"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 18 Jul 2004 03:19:44 GMT
"Liz" <Liz@nospam.com> wrote in message
news:lVlKc.103959$a24.54770@attbi_s03...
>
> "Tony Morris" <not@telling.you> wrote in message
> news:ey3Kc.4182$K53.3436@news-server.bigpond.net.au...
> >
> > > Close, if I remember right, there is something that you can set
> > > in C# that turns off the run time check for array out of bounds.
> >
> > No there isn't.
> > Perhaps you are confusing the fact that C# provides for true
> > multi-dimensional arrays where Java doesn't
>
> Ok, I confess that I didn't buy a C# compiler, but my book
> "C# in a nutshell" says there is a keyword "unsafe" that you
> can use to turn off the check. Maybe if you have a compiler you
> can try it and provide us with a demo.
>
> > (http://www.xdweb.net/~dibblego/java/faq/answers.html#q45).
> > Or perhaps using arrays in unmanaged code.
> >
> > --
> > Tony Morris
> > http://xdweb.net/~dibblego/
> >
> >
> >
>
>
Without going into detail, the unsafe keyword does a lot more than that.
"Unsafe C#" (more often referred to as unmanaged code) is analogous to
Java's JNI.
It allows the use of pointers, etc. and has the intention of allowing
existing C/C++ users to migrate over to C# i.e. run C/C++ native code from
C#.
The /unsafe compiler switch says "I know that this code does its own memory
management (etc.) and doesn't fit into the typical .NET model, but I'm
willing to accept that".
-- Tony Morris http://xdweb.net/~dibblego/
- Next message: Troy: "Servlet to Applet Communication -- Cheats"
- Previous message: Liz: "Re: Buffer Overflow Errors"
- In reply to: Liz: "Re: Buffer Overflow Errors"
- Next in thread: blmblm_at_myrealbox.com: "Re: Buffer Overflow Errors"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|