Invoking .NET methods from QML

public class YourNetObject
{
    public int Add(int value1, int value2)
    {
        return value1 + value2;
    }
}
import YourApp 2.1

YourNetObject {
    id: o
    Component.onCompleted: {
        // Outputs "2"
        console.log(o.add(1, 1))
    }
}