CSharp - Unsafe code
来源:互联网 发布:php人事管理系统 编辑:程序博客网 时间:2024/06/01 20:17
/*
Author: Jiangong SUN
*/
To maintain type safety and security, C# does not support pointer arithmetic, by default. However, by using the unsafe keyword, you can define an unsafe context in which pointers can be used.
In the common language runtime (CLR), unsafe code is referred to as unverifiable code. Unsafe code in C# is not necessarily dangerous; it is just code whose safety cannot be verified by the CLR. TheCLR will therefore only execute unsafe code if it is in a fully trusted assembly. If you use unsafe code, it is your responsibility to ensure that your code does not introduce security risks or pointer errors.
Unsafe code must be compiled by csharp compiler with keyword "/unsafe"
csc /unsafe class.cs
There are 3 types in CSharp language, which are Value types, Reference types, Pointer types.
Pointer types can only be used in unsafe mode.
- CSharp - Unsafe code
- CSharp - Code Performance
- 关于使用Unsafe code
- C# unsafe code
- C# unsafe code
- CSharp Code Snippets's Sites
- Using Unsafe Code in C#
- C# unsafe code(转)
- C# unsafe code(轉)
- C# -- Unsafe Code and Pointers
- Unsafe code may only appear if compiling with /unsafe
- Unsafe code may only appear if compiling with /unsafe
- Unsafe code may only appear if compiling with /unsafe
- Unsafe code may only appear if compiling with /unsafe
- Unsafe code may only appear if compiling with /unsafe
- Using CSharp (C#) code in Powershell scripts
- All about Unsafe Code in C#
- C#基础—不安全代码(unsafe code)
- CSharp - Anonymous method
- C#自定义控件的3种方式
- Ubuntu下关闭/打开触摸板
- <Vi and Vim>-Book Cover and Preface_001
- 犀牛书第4章 变量(中篇)
- CSharp - Unsafe code
- MySQL免安装版的启动与关闭
- CSharp - Modifiers
- ndk 用第三方so
- Android NDK 如何使用自己的共享库
- SAP 冲突算法在OCR中的应用
- 图像金字塔
- 在excel中创建sheet的索引 Use index sheets to quickly navigate in an Excel workbook
- [【hadoop】hadoop参数优化