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 DoSomethingUnsafe(...)
{
.....
}
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 "Configuration 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.
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.
Joe
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.