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

  • Cartoonium

    Cartoonium

    11 NİSAN 2011
  • Excel Video Tutorials

    Excel Video

    6 Aralık 2012
  • Monica Catral

    Monica Catra

    12 NİSAN 2009