Home > Software engineering >  How to write unsafe code blocks in c# dotnet6
How to write unsafe code blocks in c# dotnet6

Time:09-12

I want use unsafe block code in c#, how to enable my project to understand it?

My Project is .Net 6

CodePudding user response:

First you must add this tag to your project file

Project Settings

then write code like :

unsafe {
     int x = 100;
     int* pinter = &x;
}
  • Related