Skip to content

Instantly share code, notes, and snippets.

View InariAimu's full-sized avatar
🐟
Touching Fish...

Inari Aimu InariAimu

🐟
Touching Fish...
View GitHub Profile
@TheSnowfield
TheSnowfield / FuturedSocket.cs
Last active May 20, 2022 09:19
C# async/await Socket
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
internal class FuturedSocket : IDisposable
{
/// <summary>
/// Inner socket
@TheSnowfield
TheSnowfield / SandBox.cs
Last active February 14, 2024 04:56
Dynamically run C# code in the same context
public class SandBox
{
private ScriptState<object> _globalState;
public SandBox()
{
// Create initial script
var script = CSharpScript.Create(string.Empty, ScriptOptions.Default);
{
// Create an empty state