简体   繁体   中英

How to write unsafe code blocks in c# dotnet6

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

My Project is.Net 6

First you must add this tag to your project file

项目设置

then write code like:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM