-3

im sorry if my english are bad

but i want to know how to take code from website example from pastebin.com/raw/smth in the pastebin code is example "MessageBox.Show('Hello')" and c# will load it and execute it

  • 1
    @Hmax I think what OP wants is to load code from the website and then compile and execute it. – Josh Part Aug 10 '18 at 16:35
  • 1
    https://stackoverflow.com/a/37983894/123422 – Paul Abbott Aug 10 '18 at 16:36
  • You want to make a program that reads code from a website, compiles it and then executes it? If so, where do you need help? Do you know to read code from the website but not how to execute it? Do you know how to execute it but not how to read it from the site? Or you need help with both cases? – Josh Part Aug 10 '18 at 16:37
  • Executing code from a website is a bad idea. Executing code from a website you don't control is an even worse idea. –  Aug 10 '18 at 16:45

1 Answers1

0

You can use Roslyn Scripting API

Shaked Dahan
  • 402
  • 5
  • 22