Oracle Managed Driver

1). Launch Visual Studio and install OMD – Click Tools > NuGet Package Manager > Package Manager Console – Type: Install-Package Oracle.ManagedDataAccess – Locate the dll Oracle.ManagedDataAccess.dll and copy it …

Parsing VSS History Files

Parse those nasty VSS history files. Put them in a format more suitable for Gource. 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace ConsoleApplication2 { …

Customize XtraReport with C#

Use the scripts window of the report designer private void lblAccountName_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { XRLabel l = (XRLabel)sender; string s = l.Text; s = TitleCaseString(s); l.Text = s; } …

Parse Simple XML C#

123456789101112131415string s @="<?xml version=""1.0"" encoding=""utf-8"" ?><Parent><Plate>ABC123</Plate></Parent>"; XmlDocument x = new XmlDocument(); x.LoadXml(s); XmlNode rootnode = x["Parent"]; if ((rootnode != null) && (rootnode.HasChildNodes)) {      XmlNodeList nodes = rootnode.ChildNodes;   …

VS2005 Build Warning “libbmt.pdb was not found”

Build Error in Visual Studio 2005: 123LIBCMT.lib(gshandler.obj) : warning LNK4099: PDB ‘libbmt.pdb’ was not found with  ‘C:\Program Files\Microsoft Visual Studio 8\VC\ce\lib\ARMV4I\LIBCMT.lib’ or at ‘c:\Source\AIMS Ticketer 4\Release\libbmt.pdb’; linking object as if …

Serialization C#

Various serialization functions 123456789101112131415public static string SerializeObject(object obj) {     if (obj == null) { return string.Empty; }     System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(obj.GetType());     string s …

SMTP email through Microsoft 365 via C#

An example of how to use the System.Net namespace to send emails (useful for ssl or tls mail servers). 1234567891011121314151617181920SmtpClient server = new SmtpClient("Smtp.mail.microsoftonline.com"); server.Port = 587; server.EnableSsl = true; …

C# convert string to enum

12345678910   enum Colour    {       Red,       Green,       Blue    }    // …    Colour c = (Colour) Enum.Parse(typeof(Colour), "Red", true); …