Passaggio all'ora legale 30 marzo 2025 02:00 03:00 sposta avanti l'orologio di 1 ora (si dorme 1 ora in meno)
Se serve cambiare lo schema di una url in C#, ad esempio da http a https:

C#

string inputUrl = "http://www.sgart.it/home";

var u = new UriBuilder( inputUrl )
{
    Scheme = Uri.UriSchemeHttps,  // imposto https
    Port = -1 // porta di default per lo schhema
};

string resultUrl = u.ToString();  // ritorna la url con lo schema cambiato -> "https://www.sgart.it/home"

Gli altri schemi possibili sono: SchemeDelimiter, UriSchemeFile, UriSchemeFtp, UriSchemeGopher, UriSchemeHttp, UriSchemeHttps, UriSchemeMailto, UriSchemeNetPipe, UriSchemeNetTcp, UriSchemeNews e UriSchemeNntp.
Tags:
C#240 .NET69
Potrebbe interessarti anche: