Here's a super high-value C# console application that's going to corner the GUID creation market.
using System;
using System.Windows.Forms;
namespace yafla.yaflaGuid
{
class GuidToClipboard
{
[STAThread]
static void Main(string[] args)
{
string guidString
= System.Guid.NewGuid().ToString("B");
Clipboard.SetDataObject(guidString,
true);
Console.WriteLine(guidString);
}
}
}
I'm constantly in need of GUIDs ("Can you spare a GUID please, sir?"), and generally use guidgen.exe, included with the Visual Studio tools. The problem with it, however, is two fold - it's too many steps, and it includes a line feed on the end of the notepad copied guid. Annoying.
Finally I made the incredibly complex console application that you find above, generating a GUID (with no tailing linefeed), copying it to the clipboard for use elsewhere, and then spitting it out on the console (if I didn't want the console, err, "feature", this would be one unique line over the standard console wizard output). \
I'm even benevolent enough to include a binary (requires .NET 1.1 Framework. Interesting that the compiler padded it up to 16KB - will have to look at why it did that).
Enjoy this revolution in GUID creation.