"Jon Milner" <anonymous@disc ussions.microso ft.com> wrote in message
news:023601c3a9 57$8262ae60$a40 1280a@phx.gbl.. .
: How do I declare that my code is unsafe? Sorry the help
: files at my University have not been installed!
You can use unsafe blocks inside your methods as
unsafe
{
.....
}
Or you can mark a methods or entire class as unsafe
unsafe class Foo
{
//All methods in the class are unsafe
}
or
public unsafe void DoSomethingUnsa fe(...)
{
.....
}
Don't foreget to compile with */unsafe* option set. If you use VS .NET right
click on the project node in the "Solution Explorer" then chose "Properties "
and then in "Configurat ion Properties | Build" section set "Allow Unsafe
Code Blocks" to true.
BTW if you don't have help installed, but you have internet access you can
use MSDN online msdn.microsoft. com.
HTH
B\rgds
100
"Jon Milner" <anonymous@disc ussions.microso ft.com> wrote in message
news:023601c3a9 57$8262ae60$a40 1280a@phx.gbl.. .[color=blue]
> How do I declare that my code is unsafe? Sorry the help
> files at my University have not been installed![/color]
"Jon Milner" <anonymous@disc ussions.microso ft.com> wrote in message
news:023601c3a9 57$8262ae60$a40 1280a@phx.gbl.. .[color=blue]
> How do I declare that my code is unsafe? Sorry the help
> files at my University have not been installed![/color]
"Ron Vecchi" <rvecchi@xilehd vecchi.com> wrote in message
news:ux9dtWXqDH A.3688@TK2MSFTN GP11.phx.gbl...[color=blue]
> Just browsiung the posts...
> What is unsafe code?[/color]
Hi Ron,
If you want to work with pointers, you would wrap that code in an unsafe
code block. The code may in fact be safe, but the CLR can't verify it.
Welcome to C# Station! This is a community site for people interested in applying .NET using the C# programming language. We’ve been around since July 4th 2000 and have continued to grow over the years. Items of interest include Articles, Books, Links, Documentation, and Tutorials. More… Source Code If you would like to see an […]
Comment