Swi-cs-pl - A CSharp class library to connect .NET languages with SWI-Prolog
RegisterForeign Method (module, name, arity, method)
SwiPlCs interfaceSbsSW.SwiPlCsPlEngineRegisterForeign(String, String, Int32, Delegate)

Register a C# callback method

Declaration Syntax
C#Visual BasicVisual C++F#
public static bool RegisterForeign(
	string module,
	string name,
	int arity,
	Delegate method
)
Public Shared Function RegisterForeign ( 
	module As String,
	name As String,
	arity As Integer,
	method As Delegate
) As Boolean
public:
static bool RegisterForeign(
	String^ module, 
	String^ name, 
	int arity, 
	Delegate^ method
)
static member RegisterForeign : 
        module : string * 
        name : string * 
        arity : int * 
        method : Delegate -> bool 
Parameters
module (String)
The name of the module (Prolog module system)
name (String)
The name of a static C# method
arity (Int32)
The amount of parameters
method (Delegate)
a delegate to a c# method SbsSW.SwiPlCs.Callback
Return Value
Boolean
true if registration succeed otherwise false
Examples
For an example see DelegateParameterVarArgs

Assembly: SwiPlCs (Module: SwiPlCs.dll) Version: 1.1.60601.0 (1.1.60601.0)