Hi ;)!
I'm diving into F# and it's very fascinating. I'm trying to marry Optional Types and C# like here. Pretty interesting thing... however I miss something important I guess:
#light
namespace MyFSharp
// C# way
[<System.Runtime.CompilerServices.Extension>]
module ExtensionMethods =
[<System.Runtime.CompilerServices.Extension>]
let Great(s : System.String) = "Great"
using System;
using MyFSharp; // reference the F# dll
class Program
{
static void Main(string[] args)
{
var s = "foo";
//s.Awesome(); // no
Console.WriteLine(s.Great()); // yes
}
}
That's very simple - and I guess it's too early for me or something... I get:
The type 'Extension' is not defined
Maybe it's too early... but I just don't get why it isn't found.
Thanks, Marius