Logo 
Search:

.Net Framework FAQ

Submit Interview FAQ
Home » Interview FAQ » .Net FrameworkRSS Feeds

Can I write IL programs directly?

  Shared By: Topaz Ramirez    Date: Sep 20    Category: .Net Framework    Views: 1182

Answer:

Yes. Peter Drayton posted this simple example to the DOTNET mailing list:

.assembly MyAssembly {}
.class MyApp {
.method static void Main() {
.entrypoint
ldstr "Hello, IL!"
call void System.Console::WriteLine(class System.Object)
ret
}
}
Just put this into a file called hello.il, and then run ilasm hello.il. An exe assembly will be generated.

Share: 
 

Didn't find what you were looking for? Find more on Can I write IL programs directly? Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: