This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Credit: http://stackoverflow.com/questions/17601176/read-a-pdf-and-find-a-specific-column-to-add-to-a-list | |
// You'll need to download the iTextSharp dll and add a reference to it. | |
using System; | |
using System.IO; | |
using System.Text; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
using iTextSharp.text.pdf; | |
using iTextSharp.text.pdf.parser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class PancakeSort | |
{ | |
public static void Main(string[] args) | |
{ | |
// Make sure console arguments have been entered. | |
if (args.Length <= 0) | |
{ | |
Console.WriteLine("You must enter at least one string to pancake sort."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Collections; | |
class FindFirstDuplicate | |
{ | |
public static void Main() | |
{ | |
var input = new List<string> { "Foo", "Bar", "Bar", "Foo" }; | |
object result = GetFirstDuplicateValue(input); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Runtime.Serialization; | |
using System.Text; | |
using System.Xml; | |
using System.Xml.Serialization; | |
// Serialize data object into Xml format. | |
public StringWriter Serialize<T>(T data) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using System.Text; | |
using System.Xml; | |
class IndentXml | |
{ | |
public static void Main() | |
{ | |
var xmlDocument = new XmlDocument(); | |
xmlDocument.Load(@"C:\Original.xml"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
class GetAttributeValues | |
{ | |
public static void Main() | |
{ | |
// Program settings (at top for convenience since they're most likely to be modified). | |
string attributeName = "name"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ResponseData | |
{ | |
#region Fields | |
private int statusCode; | |
private string responseStream; | |
#endregion | |
#region Accessors | |
public int StatusCode | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
class TextTransfer | |
{ | |
static void Main() | |
{ | |
const string ReadingFilePath = @"C:\stuff.txt"; | |
const string WritingFilePath = @"C:\stuff2.txt"; | |
const bool AppendToFile = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
#region Argument Count / Data Type Validation | |
// Check for valid number of command line arguments. | |
if (args == null || args.Length != 4) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ConsoleApplication | |
{ | |
class Program | |
{ | |
static void Main() | |
{ |
OlderNewer