![Copy image Copy image](icons/copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
Swi-cs-pl - A CSharp class library to connect .NET languages with SWI-Prolog
RegisterForeign Method
SwiPlCs interface ► SbsSW.SwiPlCs ► PlEngine ► RegisterForeign()()()()
Register a C#-function to implement a Prolog predicate.
After this call returns successfully, a predicate with name (a string) and arity arity (a C# int) is created in module module.
If module is NULL, the predicate is created in the module of the calling context or if no context is present in the module user.
![](collapse_all.gif)
Add a additional namespace by:
using SbsSW.SwiPlCs.Callback;
![](collapse_all.gif)
For an example see DelegateParameter2 and DelegateParameter1.
![](collapse_all.gif)
Icon | Member | Description |
---|---|---|
![]() ![]() |
RegisterForeign(Delegate) |
Register a C# callback method |
![]() ![]() |
RegisterForeign(String, Delegate) |
Register a C# callback method |
![]() ![]() |
RegisterForeign(String, Int32, Delegate) |
Register a C# callback method |
![]() ![]() |
RegisterForeign(String, String, Int32, Delegate) |
Register a C# callback method |
![](collapse_all.gif)
Assembly: SwiPlCs (Module: SwiPlCs.dll) Version: 1.1.60605.0 (1.1.60605.0)