You can wrap a C library in a C# class and use it in any .Net application. This is arguable the best thing about C#. Here is an example of how to wrap a callback (function pointer).

Start by writing your C library

static const char*(*func)(void);

void set_cb(const char*(*f)(void))
    func = f;

void call_cb()
    printf("%s\n", (*func)());


Compile that into a .so library
gcc -shared -o t.c
Write the C# wrapper
using System;
using System.Runtime.InteropServices;

public delegate string CallBack();

public class T {

    public static extern void set_cb(CallBack x);

    public static extern void call_cb();

    public static void Main()
        CallBack mC = new CallBack(T.Ashley);

    public static string Ashley()
        System.Console.WriteLine("Ashley called.");
        return "Ha, you wish";


Finally, compile and run that
mcs t.cs
LD_LIBRARY_PATH=. mono t.exe
You should get the expected output
Ashley called.
Ha, you wish