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.Runtime.Serialization.Formatters.Binary; | |
using com.williambryanmiller.strings; | |
using com.williambryanmiller.testing; | |
namespace com.williambryanmiller.files { | |
class MyFiles { |
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.Drawing; | |
using System.Windows.Forms; | |
namespace com.williambryanmiller.forms { | |
class MyForms { | |
public static void centerAndSizeForm(Form f, int frm_width, int frm_height) { |
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; | |
using System.Text; | |
using com.williambryanmiller.testing; | |
using com.williambryanmiller.files; | |
namespace com.williambryanmiller.strings { | |
class MyStrings { |
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; | |
namespace com.williambryanmiller.time { | |
class TimeFormatting { | |
public static string getDurationDesc(double numMilliseconds) { | |
const double Minute = 60000; | |
const double Second = 1000; |
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.Text.RegularExpressions; | |
namespace com.williambryanmiller.testing { | |
public static class MyTests { | |
public const string MatchEmailPattern = | |
@"^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"; |
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; | |
namespace com.williambryanmiller.formatting { | |
public static class ConsoleFormatting { | |
/* Note: this code is also available on GitHub Gist @ | |
https://gist.github.com/kyrathasoft/2292a9719517246786af */ | |
public static void nThenPrint(int leadingSpaces, string str) { |
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
namespace Kyrathasoft.Dialogs.About { | |
using System; | |
using System.Diagnostics; | |
using System.Drawing; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
using System.Windows.Forms; | |
class clsAbout { |
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
/* Required for this example: | |
* | |
* a C# WinForms application | |
* add reference to ImapX.dll available here: | |
* http://hellowebapps.com/wp-content/uploads/2010/07/ImapX_1.2.3.126.zip | |
* http://dl.dropbox.com/u/12124382/ImapX.zip | |
* a button <button1> | |
* a textbox <textBox1> | |
* | |
* Notes: I used a very specific Subject line as my search criteria, but you need not do this. You could |
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
class AutoStopwatchDemo : System.Diagnostics.Stopwatch, IDisposable | |
{ | |
public AutoStopwatchDemo() | |
{ | |
Start(); | |
} | |
public void Dispose() | |
{ | |
Stop(); | |
Console.WriteLine(“Elapsed : {0}”, this.Elapsed); |
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; | |
/* a helper class, Tester, begun in Lesson 5 of intro C# console | |
programming series found at the following URL: | |
http://williammillerservices.com/windows-c-console-programming/ | |
note: to use, you would reference the file containing this code | |
from your primary program file. If you have the following program... | |
GitHub gist -> https://gist.github.com/kyrathasoft/35357f7fee1c427693323286111e5e43 | |
Pastebin.com -> https://pastebin.com/edit/K6D01kgv | |
using System; |
OlderNewer