Skip to content

Instantly share code, notes, and snippets.

@jindeveloper
Created October 31, 2022 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jindeveloper/f002993e2b6ef16ef9ac27d7679a6cf2 to your computer and use it in GitHub Desktop.
Save jindeveloper/f002993e2b6ef16ef9ac27d7679a6cf2 to your computer and use it in GitHub Desktop.
var myUrl = new MyURL();
//prints out https://localhost:8080/myCustomer
Console.WriteLine($"{myUrl}");
return 0;
public class MyURL
{
private const string protocol = "https";
private const string host = "localhost";
private const string port = "8080";
private const string tenant = "myCustomer";
//e.g. result {{protocol:}}//{host:{{port}}}/{{tenant}}
public override string ToString() => $"{protocol}://{host}:{port}/{tenant}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment