⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pointerdemo.cs

📁 Csharp实例编程百例.rar
💻 CS
字号:
using System;

public struct Gas
{
	internal double p;
	internal double t;

	public Gas(double p, double t)
	{
		this.p = p;
		this.t = t;
	}
}

public unsafe class PointerDemo
{
	public static void Main()
	{
		Gas g = new Gas(100.0, 300.0);
		WriteContents(&g);
	}

	public static void WriteContents(Gas* gas)
	{
		Console.WriteLine("p is {0}",gas->p);
		Console.WriteLine("t is {0}",gas->t);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -