mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 22:48:07 -05:00
* Extended whitelist tests to use the other method of creating a compiler without explicit compiler settings * Initialize Compiler._config as it's a struct so everything was zeroed before
16 lines
308 B
C#
16 lines
308 B
C#
using System;
|
|
using static System.Runtime.InteropServices.MemoryMarshal;
|
|
|
|
class UsingStaticTest
|
|
{
|
|
static void Main()
|
|
{
|
|
int[] array = { 10, 20, 30, 40 };
|
|
ReadOnlySpan<int> span = CreateReadOnlySpan( ref array[0], array.Length );
|
|
foreach ( var item in span )
|
|
{
|
|
Console.WriteLine( item );
|
|
}
|
|
}
|
|
}
|