This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MANUAL_SERIALIALIZATION | |
using System.Text; | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Text.Json; | |
public class WeatherForecast |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Runtime.CompilerServices; | |
class Program | |
{ | |
readonly static string s_shortString = new string((char)257, 1); | |
readonly static string s_longString = new string((char)257, 1000000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
struct S0{ } | |
struct S1{ } | |
struct S2{ } | |
struct S3{ } | |
struct S4{ } | |
struct S5{ } | |
struct S6{ } | |
struct S7{ } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
class MyBase : IEquatable<MyBase> | |
{ | |
public string X { get; set; } | |
public override bool Equals(object other) | |
{ | |
MyBase o = other as MyBase; | |
return (o != null) && Equals(o); |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
using System.Diagnostics; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
using Builder = System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>; | |
// using Awaiter = System.Runtime.CompilerServices.TaskAwaiter<string>; | |
// using Awaiter = System.Runtime.CompilerServices.TaskAwaiter; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
[Guid("00000002-0000-0000-C000-000000000046")] | |
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] | |
interface IMalloc | |
{ | |
[PreserveSig] | |
IntPtr Alloc(IntPtr cb); | |
[PreserveSig] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class Program | |
{ | |
static int s; | |
static void m0(bool f) { if (!f) return; s*=3; s/=4; s*=5; s/=6; s*=7; s/=8; s*=9; } | |
static void m1(bool f) { if (!f) return; s*=3; s/=4; s*=5; s/=6; s*=7; s/=8; s*=9; } | |
static void m2(bool f) { if (!f) return; s*=3; s/=4; s*=5; s/=6; s*=7; s/=8; s*=9; } | |
static void m3(bool f) { if (!f) return; s*=3; s/=4; s*=5; s/=6; s*=7; s/=8; s*=9; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection.Emit; | |
using System.Threading; | |
class Program | |
{ | |
static Barrier b = new Barrier(Environment.ProcessorCount + 1); | |
static void Work() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Security; | |
using System.Runtime.InteropServices; | |
class Test | |
{ | |
[DllImport("kernel32.dll")] | |
[SuppressUnmanagedCodeSecurityAttribute] | |
extern static int GetTickCount(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// csc /noconfig /nostdlib /r:System.Private.CoreLib.dll test.cs | |
using System; | |
using Internal.Runtime.Augments; | |
class My { | |
static void Work() { | |
for (;;) GC.Collect(); | |
} |