由于各种原因,我正在学习 CIL,似乎类的定义通常类似于:
.class public auto ansi beforefieldinit [...] extends [mscorlib]System.Object
Run Code Online (Sandbox Code Playgroud)
和函数定义为:
.method [...] (args) cil managed
Run Code Online (Sandbox Code Playgroud)
我理解其他一切,但我似乎无法找出“自动”或“ansi”或“cil管理”的作用。关键字也太模糊了,我无法获得特定的搜索结果(beforefieldinit 几乎立即出现)。
所以我正在使用C#Windows Forms编写Javascript编码UI.这是我按下"运行"按钮时的代码,以防它有用:
//If the button in the upper-right corner is clicked
private void run_Click(object sender, EventArgs e)
{
//If the program isn't running
if (!running)
{
//Show the web browser
webBrowser1.Visible = true;
richTextBox1.Visible = false;
//Set the label to Running
status.Text = "Running";
//Set the html text to this below
webBrowser1.DocumentText = "<!DOCTYPE html><html><body><script>\n" + richTextBox1.Text + "\n</script></body></html>";
//Set the "run" button to "stop"
run.Text = "Stop";
//Set the status to running
running = true;
}
//otherwise
else
{ …Run Code Online (Sandbox Code Playgroud)