let multiples = seq{ for i in 1 .. 999 do if i%3=0 || i%5=0 then yield i}
let sum = Seq.sum multiples
printfn "The sum is %A" sum

Pasted 18 hours ago

public class DotNetPad
{
    public static void Main(string[] args)
    {
        Console.WriteLine(Encoding.UTF16.GetString(Encoding.Default.GetBytes("qBÿ")));
    }
}

Pasted 1 day ago

public class DotNetPad
{
    public static void Main(string[] args)
    {
        Console.WriteLine(Path.GetDirectoryName("C:/forward/slashes/work.txt"));
        Console.WriteLine(Path.GetDirectoryName("C:\\back\\slashes\\work.txt"));
    }
}

Pasted 3 days ago

public class DotNetPad
{
    public static void Main(string[] args)
    {
        Console.WriteLine(Path.GetDirectoryName("C:/forward/slashes/work.txt");
        Console.WriteLine(Path.GetDirectoryName("C:\\back\\slashes\\work.txt");
    }
}

Pasted 3 days ago

let rec counta c =
  match c with 
  | 1999999999 -> c
  | _ -> (counta (c + 1))
printfn "Looped %A times" (counta())

Pasted 3 days ago

let rec counta c =
  match c with 
  | 1999999999 -> ()
  | _ -> (counta (c+1))
let rec countb c =
  match c with 
  | 1999999999 -> ()
  | _ -> (counta (c+0)
         (counta (c+1))
counta()

Pasted 3 days ago

public class DotNetPad
{
    public static void Main(string[] args)
    {
        string s = null;
        s = s.ToString();
        Console.WriteLine(s);
    }
}

Pasted 4 days ago

public class DotNetPad
{
    public static void Main(string[] args)
    {
        string s = null;
        s = s.ToString().Trim();
        Console.WriteLine(s);
    }
}

Pasted 4 days ago

public class DotNetPad
{
    public static void Main(string[] args)
    {
        string s = null;
        s = s.Trim();
    }
}

Pasted 4 days ago

let mutable a = 43628u
for i = 1 to 10 do
  a <- a - ((a >>> 21) ||| (a <<< (32 - 21)))
  printfn "%A" a

Pasted 5 days ago

public class DotNetPad
{
    public static void Main(string[] args)
    {
        Console.WriteLine(DateTime.Now.ToString("dd MMM yyyy, hh:mm zzz"));
    }
}

Pasted 6 days ago

public class DotNetPad
{
    public static void Main(string[] args)
    {
        Console.WriteLine(DateTime.Now.ToOADate());
    }
}

Pasted 6 days ago