0

I would like to know how to run the c# process form my notepad? Could you give me some advise please? I have the c# code in the notepad and I would like to run this class outside visual studio because, as, when I updated a new algorithm from the internet and save it to .cs, my command was not updated by the program. The program need to be restarted, but if the process was called form outside, do I have to save it on notepad or something it can run by hooking a code? Thank you

public class Answer 
{
  //need run c#code process from notepad here
}
Oat
  • 11
  • 3
  • You mean you want to be able to execute small parts of your program without compiling the whole project? – Rafalon Apr 17 '18 at 08:31
  • Yes i mean just this past run from c# code outside visual studio – Oat Apr 17 '18 at 08:36
  • Maybe search for "*execute c# online*"? – Rafalon Apr 17 '18 at 08:38
  • thank you but I want to run form my notepad because my algorithm will save data in notepad and hook this class to visual studio – Oat Apr 17 '18 at 08:41
  • I still don't understand why you don't want to execute it from visual studio. Additionally, the given "*code*" isn't really helpful as it doesn't show anything you want to do – Rafalon Apr 17 '18 at 08:43
  • 2
    You seem a bit confused, or at least you are using confusing words. You used *form* **four times** (1*title, 2*content and 1*comment) when I believe you actually meant *from*. You say your algorithm is going to store data *in notepad*, but notepad isn't a database. Did you mean *in a text file*? Try to clean your question, be **precise**, please – Rafalon Apr 17 '18 at 08:49
  • ok thankyou sorry for my confusing words I will add this code in Answer class [Command("cat")]public async Task catAsync(){await ReplyAsync("meaww"); a command will add form my chat on internet when i send my chat to my bot. When I send "add cat answer meaww" to my bot chat. This code will appear in my Answer.cs But a program need to restart for complier this line so I would like to keep this command in my notepad and hook this code to complier in viusl studio this way it can run my new command with out restart programme thank you :) – Oat Apr 17 '18 at 09:17
  • c# is not a scripting language; it has to be compiled to run. You can do that without VS, even trigger the whole process from your application but it will be a different application. – TaW Apr 17 '18 at 09:30
  • thank you and sorry for my confusing words "notepad" i mean "textfile" .txt – Oat Apr 17 '18 at 10:34
  • @Oat please use the [edit](https://stackoverflow.com/posts/49873220/edit) function to add the code and correct your question – Rafalon Apr 18 '18 at 07:44
  • Thank you very much @Rafalon my problem is sloved :) thank you. – Oat Apr 19 '18 at 05:03

0 Answers0