Skip to content

Instantly share code, notes, and snippets.

@dunglas
Created May 25, 2020 18:03
Embed
What would you like to do?
URI Template test in C#
using System;
using Tavis.UriTemplates;
public class Program
{
public static void Main()
{
var ut = new UriTemplate("https://example.net/{ip}");
var p = ut.GetParameters(new Uri("https://example.net/2001:db8::35"));
Console.WriteLine(p["ip"]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment