日期:2014-05-17 浏览次数:20669 次
string url = "http://img.taobaocdn.com/bao/uploaded/i3/T1oAygXmpbXXcrs7k."; Uri uri = new Uri(url); string AbsoluteUri = uri.AbsoluteUri + "."; object m_Info = typeof(Uri).GetField("m_Info", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(uri); object MoreInfo = typeof(Uri).Assembly.GetType("System.Uri+UriInfo").GetField("MoreInfo", BindingFlags.Instance | BindingFlags.Public).GetValue(m_Info); typeof(Uri).Assembly.GetType("System.Uri+MoreInfo").GetField("AbsoluteUri", BindingFlags.Instance | BindingFlags.Public).SetValue(MoreInfo, AbsoluteUri); ulong m_Flags = (ulong)typeof(Uri).GetField("m_Flags", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(uri); typeof(Uri).GetField("m_Flags", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(uri, m_Flags & (ulong.MaxValue ^ 0x2000L));