Using F#-project from C#<br />
New F#-project<br />
Build<br />
New C#-project and “Add reference…”<br />
Projects -> F#-project<br />
Use as any dll-library<br />
In class libraries<br />
Note when you do a class library<br />
Note when you do a class library<br />
Upcoming SlideShare
Loading in …5
×

Using f# project from c#

1,568 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,568
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • All the normal class structures work but often you get easier than that Default F# Module = C# static class- Namespaces and non-static class are easy to make-Int, string, etc. basic CLR-types are the same in both languages
  • - Func&lt;T1, R&gt; is not compatible with F#-function. The reason is that C# has separate classes for Func&lt;T,R&gt; and Action&lt;T&gt;. C#-problem: Void is not a type.Tuple is .NET 4.0 class. List&lt;T&gt; is n times, but one type. Tuple&lt;…&gt; is one time, but n types. So it is a lightweight “container object”. If you want to use advanced F# types in C#, you may add a reference: using FSharp.Core
  • Properties and methods (starts with capital letter in C#)AssemblyInfo is not default, but it is easy to addStrongName is not default, but it is easy to add The same CLR: .NET Reflector (etc) works
  • Using f# project from c#

    1. 1. Using F#-project from C#<br />
    2. 2. New F#-project<br />
    3. 3. Build<br />
    4. 4. New C#-project and “Add reference…”<br />
    5. 5. Projects -> F#-project<br />
    6. 6. Use as any dll-library<br />
    7. 7. In class libraries<br />
    8. 8. Note when you do a class library<br />
    9. 9. Note when you do a class library<br />

    ×