summaryrefslogtreecommitdiff
path: root/tests/projects/csharp/native_aot/src/cslib/MathLib.cs
blob: 83255a4b3a91118f1ba6e5780e168849b4998f80 (plain)
1
2
3
4
5
6
7
8
9
using System.Runtime.InteropServices;

public static class MathLib {
    [UnmanagedCallersOnly(EntryPoint = "cs_add")]
    public static int Add(int a, int b) => a + b;

    [UnmanagedCallersOnly(EntryPoint = "cs_multiply")]
    public static int Multiply(int a, int b) => a * b;
}