CSScriptNativeApi.HostApp.CodeDomSamples.CreateFunc C# (CSharp) Метод

CreateFunc() публичный статический Метод

public static CreateFunc ( ) : void
Результат void
            public static void CreateFunc()
            {
                // Wraps method into a class definition, compiles it and loads the compiled assembly.
                // It returns duck-typed delegate. A delegate with 'params object[]' arguments and 
                // int as a return type. 

                var Sqr = CSScript.CreateFunc<int>(@"int Sqr(int a)
                                                     {
                                                         return a * a;
                                                     }");
                int r = Sqr(3);
            }