Skip to content

Instantly share code, notes, and snippets.

@mwolicki
mwolicki / cast.cs
Last active December 20, 2016 21:14
using System;
namespace Example
{
class MainClass
{
static void Main()
{
Display(0);
Display(new A(6));
#nowarn "9"
let mutate (txt:string) : unit =
use ch = fixed txt
for i = 0 to txt.Length - 1 do
Microsoft.FSharp.NativeInterop.NativePtr.set ch i 'z'
let text = "abcd"
printfn "%s" text
mutate text
printfn "%s" text