Is it possible to call a C# function from Node.JS/JavasciptHidden Features of C#?Calling the base constructor in C#Best way to repeat a character in C#Get int value from enum in C#How to decide when to use Node.js?In Node.js, how do I “include” functions from my other files?How can I add new array elements at the beginning of an array in Javascript?Pure JavaScript equivalent of jQuery's $.ready() - how to call a function when the page/DOM is ready for itHow do I return the response from an asynchronous call?Why not inherit from List<T>?

How to retract the pitched idea from employer?

What is this solid state starting relay component?

How do I write "Show, Don't Tell" as a person with Asperger Syndrome?

What are the peak hours for public transportation in Paris?

siunitx error: Invalid numerical input

Where does this pattern of naming products come from?

Efficient integer floor function in C++

Why is the application of an oracle function not a measurement?

What LISP compilers and interpreters were available for 8-bit machines?

Do you need type ratings for private flying?

Company did not petition for visa in a timely manner. Is asking me to work from overseas, but wants me to take a paycut

Cause of continuous spectral lines

Version 2 - print new even-length arrays from two arrays

Are "living" organ banks practical?

Select items in a list that contain criteria #2

Why does the Schrödinger equation work so well for the Hydrogen atom despite the relativistic boundary at the nucleus?

Strange symbol for two functions

Did the first version of Linux developed by Linus Torvalds have a GUI?

Is it recommended against to open-source the code of a webapp?

How to generate random points without duplication?

Etymology of 'calcit(r)are'?

How hard would it be to convert a glider into an powered electric aircraft?

Is it possible to express disjunction through conjunction and implication?

Last survivors from different time periods living together



Is it possible to call a C# function from Node.JS/Javascipt


Hidden Features of C#?Calling the base constructor in C#Best way to repeat a character in C#Get int value from enum in C#How to decide when to use Node.js?In Node.js, how do I “include” functions from my other files?How can I add new array elements at the beginning of an array in Javascript?Pure JavaScript equivalent of jQuery's $.ready() - how to call a function when the page/DOM is ready for itHow do I return the response from an asynchronous call?Why not inherit from List<T>?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















I wonder if it is possible to call a C# function from javascript like I try to do below as an example? (I use Node.js)



Is it possible to combine this in anyway to let the csharpfunction use its way to calculate doubles, Int32 etc csharp types for calculation?






var a = 4;
var b = 3;
var array = ["1", "2"];

//Is it possible to call the "csharpfunction" from javascript?


double csharpfunction(double a, double b, string[] array)

a = a * b;
return a;












share|improve this question






























    2















    I wonder if it is possible to call a C# function from javascript like I try to do below as an example? (I use Node.js)



    Is it possible to combine this in anyway to let the csharpfunction use its way to calculate doubles, Int32 etc csharp types for calculation?






    var a = 4;
    var b = 3;
    var array = ["1", "2"];

    //Is it possible to call the "csharpfunction" from javascript?


    double csharpfunction(double a, double b, string[] array)

    a = a * b;
    return a;












    share|improve this question


























      2












      2








      2








      I wonder if it is possible to call a C# function from javascript like I try to do below as an example? (I use Node.js)



      Is it possible to combine this in anyway to let the csharpfunction use its way to calculate doubles, Int32 etc csharp types for calculation?






      var a = 4;
      var b = 3;
      var array = ["1", "2"];

      //Is it possible to call the "csharpfunction" from javascript?


      double csharpfunction(double a, double b, string[] array)

      a = a * b;
      return a;












      share|improve this question
















      I wonder if it is possible to call a C# function from javascript like I try to do below as an example? (I use Node.js)



      Is it possible to combine this in anyway to let the csharpfunction use its way to calculate doubles, Int32 etc csharp types for calculation?






      var a = 4;
      var b = 3;
      var array = ["1", "2"];

      //Is it possible to call the "csharpfunction" from javascript?


      double csharpfunction(double a, double b, string[] array)

      a = a * b;
      return a;








      var a = 4;
      var b = 3;
      var array = ["1", "2"];

      //Is it possible to call the "csharpfunction" from javascript?


      double csharpfunction(double a, double b, string[] array)

      a = a * b;
      return a;





      var a = 4;
      var b = 3;
      var array = ["1", "2"];

      //Is it possible to call the "csharpfunction" from javascript?


      double csharpfunction(double a, double b, string[] array)

      a = a * b;
      return a;






      javascript c# node.js






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 24 at 21:28









      Burak Yeniçeri

      5611




      5611










      asked Mar 24 at 15:33









      AndreasAndreas

      1881111




      1881111






















          1 Answer
          1






          active

          oldest

          votes


















          2














          Because C# has its own garbage collection system and thus needs its own infrastructure running and its data formats are completely different and custom, it would probably be simplest to just wrap your function in a super simple server, run that separate process from your node.js app and then send requests to that server (probably via localhost on a predetermined port) to execute whatever you're trying to do. You can decide what type of server and data interchange format you want to use, but HTTP and JSON would be simple and quick to implement as long as they didn't cause efficiency issues. For the data to go between languages, it's going to have to be put in some standard format any way.



          node.js has an addon system, but it is geared to C/C++ so you'd probably have to wrap your C# code in a C/C++ wrapper to use it directly and you'd still probably have to put your C# code in its own process in order to allow its garbage collector to have a place to run and do its thing. My sense is that a simple server in its own process is probably even easier than using the addon system in this case.






          share|improve this answer

























          • I see, so I should use an own process in someway and pass the calculations there. It sounds like a good and clean way to do it. Thank you!

            – Andreas
            Mar 24 at 16:02











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55325428%2fis-it-possible-to-call-a-c-sharp-function-from-node-js-javascipt%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Because C# has its own garbage collection system and thus needs its own infrastructure running and its data formats are completely different and custom, it would probably be simplest to just wrap your function in a super simple server, run that separate process from your node.js app and then send requests to that server (probably via localhost on a predetermined port) to execute whatever you're trying to do. You can decide what type of server and data interchange format you want to use, but HTTP and JSON would be simple and quick to implement as long as they didn't cause efficiency issues. For the data to go between languages, it's going to have to be put in some standard format any way.



          node.js has an addon system, but it is geared to C/C++ so you'd probably have to wrap your C# code in a C/C++ wrapper to use it directly and you'd still probably have to put your C# code in its own process in order to allow its garbage collector to have a place to run and do its thing. My sense is that a simple server in its own process is probably even easier than using the addon system in this case.






          share|improve this answer

























          • I see, so I should use an own process in someway and pass the calculations there. It sounds like a good and clean way to do it. Thank you!

            – Andreas
            Mar 24 at 16:02















          2














          Because C# has its own garbage collection system and thus needs its own infrastructure running and its data formats are completely different and custom, it would probably be simplest to just wrap your function in a super simple server, run that separate process from your node.js app and then send requests to that server (probably via localhost on a predetermined port) to execute whatever you're trying to do. You can decide what type of server and data interchange format you want to use, but HTTP and JSON would be simple and quick to implement as long as they didn't cause efficiency issues. For the data to go between languages, it's going to have to be put in some standard format any way.



          node.js has an addon system, but it is geared to C/C++ so you'd probably have to wrap your C# code in a C/C++ wrapper to use it directly and you'd still probably have to put your C# code in its own process in order to allow its garbage collector to have a place to run and do its thing. My sense is that a simple server in its own process is probably even easier than using the addon system in this case.






          share|improve this answer

























          • I see, so I should use an own process in someway and pass the calculations there. It sounds like a good and clean way to do it. Thank you!

            – Andreas
            Mar 24 at 16:02













          2












          2








          2







          Because C# has its own garbage collection system and thus needs its own infrastructure running and its data formats are completely different and custom, it would probably be simplest to just wrap your function in a super simple server, run that separate process from your node.js app and then send requests to that server (probably via localhost on a predetermined port) to execute whatever you're trying to do. You can decide what type of server and data interchange format you want to use, but HTTP and JSON would be simple and quick to implement as long as they didn't cause efficiency issues. For the data to go between languages, it's going to have to be put in some standard format any way.



          node.js has an addon system, but it is geared to C/C++ so you'd probably have to wrap your C# code in a C/C++ wrapper to use it directly and you'd still probably have to put your C# code in its own process in order to allow its garbage collector to have a place to run and do its thing. My sense is that a simple server in its own process is probably even easier than using the addon system in this case.






          share|improve this answer















          Because C# has its own garbage collection system and thus needs its own infrastructure running and its data formats are completely different and custom, it would probably be simplest to just wrap your function in a super simple server, run that separate process from your node.js app and then send requests to that server (probably via localhost on a predetermined port) to execute whatever you're trying to do. You can decide what type of server and data interchange format you want to use, but HTTP and JSON would be simple and quick to implement as long as they didn't cause efficiency issues. For the data to go between languages, it's going to have to be put in some standard format any way.



          node.js has an addon system, but it is geared to C/C++ so you'd probably have to wrap your C# code in a C/C++ wrapper to use it directly and you'd still probably have to put your C# code in its own process in order to allow its garbage collector to have a place to run and do its thing. My sense is that a simple server in its own process is probably even easier than using the addon system in this case.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 24 at 16:37

























          answered Mar 24 at 15:40









          jfriend00jfriend00

          449k56596641




          449k56596641












          • I see, so I should use an own process in someway and pass the calculations there. It sounds like a good and clean way to do it. Thank you!

            – Andreas
            Mar 24 at 16:02

















          • I see, so I should use an own process in someway and pass the calculations there. It sounds like a good and clean way to do it. Thank you!

            – Andreas
            Mar 24 at 16:02
















          I see, so I should use an own process in someway and pass the calculations there. It sounds like a good and clean way to do it. Thank you!

          – Andreas
          Mar 24 at 16:02





          I see, so I should use an own process in someway and pass the calculations there. It sounds like a good and clean way to do it. Thank you!

          – Andreas
          Mar 24 at 16:02



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55325428%2fis-it-possible-to-call-a-c-sharp-function-from-node-js-javascipt%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현