MSCL Super Tools Class (C #), Developer Essentials, development tool

Source: Internet
Author: User
Tags log log

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.