Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 368 Bytes

MA0118.md

File metadata and controls

19 lines (14 loc) · 368 Bytes

MA0118 - [JSInvokable] methods must be public

Methods marked as [JSInvokable] must be public.

using Microsoft.JSInterop;

class Test
{
    [JSInvokable]
    public void A() {}

    [JSInvokable]
    internal void B() {} // non-compliant, the method is internal

    [JSInvokable]
    static void C() {}  // non-compliant, the method is private
}";