Skip to content

Instantly share code, notes, and snippets.

View evilguest's full-sized avatar
🏠
Working from home

Anton Zlygostev evilguest

🏠
Working from home
  • Novosibirsk. Russia
View GitHub Profile
@akarpov89
akarpov89 / InterpolatedParsing.cs
Created October 1, 2021 14:58
Interpolated parsing technique
using System.Runtime.CompilerServices;
using static ParsingExtensions;
string input = "Name: Andrew; Age: 31";
string? name = null;
int age = 0;
if (input.TryParse($"Name: {Placeholder(ref name)}; Age: {Placeholder(ref age)}"))
{