I want to know if it\'s possible to call r statistics optimization function (here I want to use regnoud) from C# while the function to be optimized is written in C#. I fou
If I understand your need clearly, you have a an optimisation problem with a C# calling R calling back C#.
I do not think there is a way to set up a callback function ("function pointer", "delegate" as they can be called depending on who you talk to) in R.NET currently. I am likely to have very similar needs and may contribute this to R.NET in the future, if I can allocate the time.
Meanwhile, if it is acceptable to have things such that you work from R calling C#, i.e. R is the entry point of your application, this is definitely doable using the rClr package. I have colleagues doing optimisation and MCMC analysis of a model written in C#. One tutorial is a very simplified but realistic case of optimisation from R using C#.