tools in .Net

1.System.Web.HttpContext.Current
string mapPath = System.Web.HttpContext.Current.Server.MapPath("~/Data");
2.AssemblyUtil.GetCurrentAssemblyPath();
3.Directory
Directory.GetParent("ccc").FullName
4.Path
Path.Combine(Directory.GetParent(mapPath).FullName, "Data");
5.using System.Xml.Serialization;
//T is generic
var se= new XmlSerializer(typeof(T));
using (var r = new System.IO.StreamReader("test.xml"))
{
                        result = (T)se.Deserialize(r);
}

评论

此博客中的热门博文

XML, XSL, HTML

Input in element.eleme.io

Data URI是由RFC 2397 ACE