Cheat Sheet Archive

Date Formatting Cheat Sheet in C#.Net

Syntax: <%= String.Format(“{specifier}”, DateTime.Now) %> Specifier Description Output d Short Date 8/4/2007 D Long Date 8-Apr-07 t Short Time 21:08 T Long Time 21:08:59 f Full date and time 4/8/2007 21:08 F Full date and time (long) 4/8/2007 21:08 g Default date and time 8/4/2007 21:08 G Default date and time (long) 8/4/2007 21:08 M

VBScript equivalent string functions in C#.Net

C# Method VBScript Description IndexOf() InStr Returns the position of the first occurrence of one string within another. The search begins at the first character of the string – InStrRev Returns the position of the first occurrence of one string within another. The search begins at the last character of the string ToLower() LCase Converts

Asp.Net Xml Exceptions Cheat Sheet

Exception Description UpaException XmlException Returns detailed information about the last exception. XmlSchemaException Returns detailed information about the schema exception. XmlSchemaInferenceException Returns information about errors encountered by the System.Xml.Schema.XmlSchemaInference class while inferring a schema from an XML document. XmlSchemaValidationException Represents the exception thrown when XML Schema Definition Language (XSD) schema validation errors and warnings are encountered

C#.Net Regular Expression Cheat Sheet Reference

Character Description Marks the next character as either a special character or escapes a literal. For example, “n” matches the character “n”. “n” matches a newline character. The sequence “\” matches “” and “(” matches “(“. Note: double quotes may be escaped by doubling them: “<a href=””…>” ^ Depending on whether the MultiLine option is

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!