SORU
26 Ocak 2009, PAZARTESİ


Host yerine Urı

Ne bir Urı kullanarak ev sahibi olan parçanın değiştirilmesi en güzel yolu .NET?

I. e.:

string ReplaceHost(string original, string newHostName);
//...
string s = ReplaceHost("http://oldhostname/index.html", "newhostname");
Assert.AreEqual("http://newhostname/index.html", s);
//...
string s = ReplaceHost("http://user:pass@oldhostname/index.html", "newhostname");
Assert.AreEqual("http://user:pass@newhostname/index.html", s);
//...
string s = ReplaceHost("ftp://user:pass@oldhostname", "newhostname");
Assert.AreEqual("ftp://user:pass@newhostname", s);
//etc.

Sistem.Uri çok yardımcı olacak gibi görünmüyor.

CEVAP
26 Ocak 2009, PAZARTESİ


System.UriBuilder sonra ne

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • colacas

    colacas

    29 EKİM 2006
  • Fraser Raft

    Fraser Raft

    9 Mart 2010
  • theKGB65

    theKGB65

    24 Aralık 2007