Dear all,
Coba dig through IL spesification, di sana tidak
terdapat perintah agar method harus di declare di dalam class.
Iseng-iseng untuk melihat kebenaran hipotesa tersebut, saya menulis
MSIL code di notepad:
.assembly HelloIL{} // assembly manifest
.method static void Main() cil managed {
.entrypoint
ldstr "I'm not inside any class, and still, I am 100% .NET"
call void [mscorlib]
System.Console::WriteLine(string)
ret
}
save file tersebut menjadi helloil.il, lalu ketik ilasm helloil, maka akan terbentuk file
helloil.exe
Jalankan file tersebut and you now the rest.
So bagi para pemula yang baru belajar .NET, apabila ada orang
mengatakan "Dalam .NET, semua method harus di declare di dalam class,
karena .NET sudah fully OOP" segeralah hujat orang tersebut!
Benarkanlah statement tersebut dengan "Dalam C#, semua method harus di
declare di dalam class, karena C# sudah fully OOP" karena OOness dari
.NET itu ada pada language level.
regards,
Dicky Arinal
- [teknologia] Baru sadar: .NET is not fully OOP, but C# and ... Dicky Arinal
- [teknologia] Re: Baru sadar: .NET is not fully OOP, bu... Ariya Hidayat
- [teknologia] Re: Baru sadar: .NET is not fully OOP... Dicky Arinal
- [teknologia] Re: Baru sadar: .NET is not fully... Ronny Haryanto
