Skip to content

Instantly share code, notes, and snippets.

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

Daniel Ferreira Monteiro Alves danfma

🏠
Working from home
  • Tech Lead at Upland.me
  • Goiânia - Goiás - Brazil
  • X @danfma
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)}"))
{