JavaScript Side

<script type="text/javascript">

   // get .net object public field from js
   var myFunction1 = function (a) {
        document.title =  a.IntTest + a.StringTest
         + a.ArrayTest[0] + a.JaggedArrayTest[1][1] + a.DictionaryTest[1];
    };

  // invoke .net object public methods from js
   var myFunction2 = function (a) {
        var map = new Map([[1, "val1"], [2, "val2"]]);
        a.Init(1, 1.1, "test", '*', [1.2, 1.3], [[1, 2, 3], [4, 5]], Array.from(map));
    };
</script>


.NET Side

ExampleObj class:

private class ExampleObj
{
    public event EventHandler DataInit;

    public int IntTest { get; set; }
    public decimal DecimalTest { get; set; }
    public string StringTest { get; set; }
    public char CharTest { get; set; }
    public double[] ArrayTest { get; set; }
    public int[][] JaggedArrayTest { get; set; }
    public IDictionary<int, string> DictionaryTest { get; set; }

    public void Init(int intTest, decimal decimalTest, string stringTest, char charTest, double[] arrayTest, int[][] jaggedArrayTest, IDictionary<int, string> dictionaryTest)
    {
        this.IntTest = intTest;
        this.DecimalTest = decimalTest;
        this.StringTest = stringTest;
        this.CharTest = charTest;
        this.ArrayTest = arrayTest;
        this.JaggedArrayTest = jaggedArrayTest;
        this.DictionaryTest = dictionaryTest;

        var dataInit = DataInit;
        if (dataInit != null)
        {
            dataInit.Invoke(this, new EventArgs());
        }
  

Calling myFunction1()

// call myFunction1
{
    String title = String.Empty;
    browser.TitleChangedEvent += delegate(object sender, TitleEventArgs e)
    {
        title = e.Title;
        Console.WriteLine("Title: {0}", title);
    };
    JSValue value = browser.ExecuteJavaScriptAndReturnValue("myFunction1");
    ExampleObj a = new ExampleObj();
    a.IntTest = 1;
    a.StringTest = "z";
    a.ArrayTest = new double[] { 1, 2 };
    int[][] jaggedArrayTest = 
    { 
        new int[] {1},
        new int[] {2,3}
    };
    a.JaggedArrayTest = jaggedArrayTest;

    a.DictionaryTest = new Dictionary<int, string>();
    a.DictionaryTest.Add(1, "a");

    ((JSFunction)value).Invoke(null, a);

    /*Output: 
    Title: 1z13a */
}

Calling myFunction2()

{
    JSValue value = browser.ExecuteJavaScriptAndReturnValue("myFunction2");
    var a = new ExampleObj();

    a.DataInit += delegate
    {
        Console.WriteLine("IntTest = {0}, DecimalTest = {1}, StringTest = {2}, CharTest = {3}, ArrayTest[0] = {4}, JaggedArrayTest[1][1] = {5}, DictionaryTest[2] = {6}"
            , a.IntTest, a.DecimalTest, a.StringTest, a.CharTest, a.ArrayTest[0], a.JaggedArrayTest[1][1], a.DictionaryTest[2]);
    };

    JSFunction)value).Invoke(null, a);

    /*Result:
    IntTest = 1, DecimalTest = 1.1, 
    StringTest = test, CharTest = *, 
    ArrayTest[0] = 1.2, JaggedArrayTest[1][1] = 5, 
    DictionaryTest[2] = val2 */
}