Skip to content

Instantly share code, notes, and snippets.

View leppie's full-sized avatar
🤡

Llewellyn Pritchard leppie

🤡
  • Cape Town, South Africa
View GitHub Profile
@naikrovek
naikrovek / visascope.cs
Created May 28, 2014 22:15
Simple little test app I wrote to test VISA instrument control. This will require changes in order to be useful. BONUS: Dumper class, useful for many things around the house!
using Ivi.Visa.Interop;
using System;
using System.IO;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.Remoting;
using System.Runtime.Serialization;
namespace ConsoleApplication1 {
using System;
using System.Linq;
class Program
{
static void Main()
{
if (true.Any is object) { }
if (ICloneable.Clone is object) { }
}
class Program
{
// What argument do you need to provide to this method so that it returns true?
public static bool AreYouNuts<T>(T[] array)
{
if (array == null || array.Length == 0)
return false;
var local = (T[]) array.Clone();
@leppie
leppie / gist:2868328
Created June 4, 2012 13:20
CallWithEscapeContinuation Usage
using System;
using System.Linq;
class Program
{
sealed class EscapeContinuation<T> : Exception
{
public T Value { get; private set; }
public void Raise(T value)