Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
SQL Server 119
#SQLServer 88
Oracle 70
#SQL SERVER 35
BRH 31
SQL Server 2012 29
denali 23
#TSQL 19
TSQL 19
C# 15

Archive · View All
October 2011 31
November 2011 30
September 2011 30
August 2011 18
December 2011 15
July 2011 13
June 2011 8
May 2012 4
April 2012 3
January 2010 3

How to call a F# dll from C#

Aug 9 2011 6:48AM by Niladri Biswas   

Step 1:

Choose F# library project. Give the name as TestLibrary

Step 2: :

Add the below code

namespace MySampleNamespace
module public MyModule=

let AddNumbers (a, b) = a + b

The program is to add to numbers

Step 3: :

Build the solution. We will get TestLibrary.dll in the bin\debug folder

Step 4: :

Create a C# Console Application. Add the F# dll (TestLibrary.dll) through the Add Reference window.

Step 5: :

Add the below code


using System;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string display = "Addition of {0} and {1} is {2}";

            Console.WriteLine(
                               string.Format(
                                                display
                                                , 10
                                                , 20
                                                , MySampleNamespace.MyModule.AddNumbers(10, 20)
                                            ));
            Console.ReadKey(true);
        }
    }
}

So the trick is NamespaceName.ModuleName.FunctionName

Output

Addition of 10 and 20 is 30 :

Tags: F#,


Niladri Biswas
7 · 21% · 6720
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]