MSCL Super Tool Class Library
is based on the C # development of the super-strong tool class collection, covering the daily B/s or C + + development of many aspects, including hundreds of common packaging classes (database operation class fully support MySQL, Access, Oracle, SQL Server, SQLite and other databases, commonly used string processing class, Memory Container class, Session/cookie/cache class, config configuration file helper class, data type conversion class, conversion class, Time Date helper class, data encryption and decryption class, File/directory operation class, File download class, FTP operation class, image upload/download class, Image common processing class-Flip, Blur, watermark, thumbnail, JSON helper class, log log class, HTTP wrapper class, email message wrapper class, Nopi operation Class-No dependent Office component implementation EXECL Import and Export tool, execl/csv operation class, Until common tools class, data paging class, remote acquisition class, JS encapsulation class, reg regular validation class, request requests class, random number Generation class, serialization deserialization wrapper class, XML operation class, zip compression and decompression class, etc... Omit 10,000 words here), that is, the wrapper class comes with a call example and parameter comments, all-fool invocation, easy to use. Have this super-strong tool class, can greatly improve the productivity of C # developers and code quality, truly "tools in hand, a do have", so that the vast number of the hardship of the monkey friends, early escape from the abyss of misery, swim in the world of Code ^_^, If you need to buy MSCL Super Tool Library source code, Please scan the right QR code to buy
usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.IO;usingSystem.Reflection;usingSystem.Data;usingSystem.Data.SqlClient;usingsystem.web;namespacemscl{/// <summary> ///Log Helper Class/// </summary> Public classLoghelper {/// <summary> ///Log error Messages/// </summary> /// <param name= "ex" >Error</param> Public Static voiderrorlog (Exception ex) {stringdir = Path () +@"/log/"+ DateTime.Now.ToString ("yyyy-mm") +"/"; stringFileName ="Log_"+ DateTime.Now.ToString ("DD") +". txt"; stringPath = dir +FileName; StreamWriter SW=NULL; Try{directory.createdirectory (dir); SW=NewStreamWriter (Path,true); Sw. WriteLine (string. Format ("-------------{0}--------------", DateTime.Now.ToString ("yyyy-mm-dd HH:mm:ss FFFF"))); Sw. WriteLine (ex. ToString ()); Sw. WriteLine (); Sw. Flush (); } Catch { } finally { if(SW! =NULL) {SW. Close (); SW=NULL; } } } /// <summary> ///Log error Messages/// </summary> /// <param name= "str" >error Message</param> Public Static voidErrorlog (stringstr) { stringdir = Path () +@"/log/"+ DateTime.Now.ToString ("yyyy-mm") +"/"; stringFileName ="log_custome_"+ DateTime.Now.ToString ("DD") +". txt"; stringPath = dir +FileName; StreamWriter SW=NULL; Try{directory.createdirectory (dir); SW=NewStreamWriter (Path,true); Sw. WriteLine (string. Format ("-------------{0}--------------", DateTime.Now.ToString ("yyyy-mm-dd HH:mm:ss FFFF"))); Sw. WriteLine (str); Sw. WriteLine (); Sw. Flush (); } Catch { } finally { if(SW! =NULL) {SW. Close (); SW=NULL; } } } /// <summary> ///get the directory where the project is located/// </summary> /// <returns></returns> Private Static stringPath () {stringPath = HttpContext.Current.Server.MapPath ("~/"); returnpath; } }}
MSCL Super Tools Class (C #), Developer Essentials, development tool