Start a new topic

nameof not found anymore

I was given this code snippet before on Js.function apply. Is uses a 'nameof'

method... Now that does not compile anymore...


What happened to 'nameof' in the following code:


using System;

using DuoCode.Dom;

using DuoCode.Runtime;


namespace HelloDuoCode

{

  [Js(Name = "jQuery", Extern = true)]

  public static class JQueryInit

  {

    [Js(Name = "fn.init")]

    public static extern object init(params Element[] elements);

  }

   

  public static class Program

  {

    public static object jquery(params Element[] elements)

    {

      Js.function(nameof(JQueryInit.init)).apply(null, elements);

      return null;

    }


    public static void Main()

    {

      System.Console.WriteLine("Hello DuoCode");

    }

  }

}





C# 6 was my problem... THANK YOU FOR THE INFO

Login or Signup to post a comment