C # example 1

xiaoxiao2021-03-06  19

Using system; use system.windows.forms; namespace my_app {static class entrypoint {static void main () {Application.run (new form ());}}

The .NET class library provides a foundation type for all Windows forms: from, this class is in the assembly (including translator translation into an assembly) of System.Windows.Forms, we can use this class directly or from Base class from Inherit, create your own class.

The above is an example implemented under C #. Give an example of IronPython: (all in the interactive environment, IronPythonConsole)

>> Import Sys

>> from system.windows Import Forms

>> sys.loadassemblybyname ("syste.windows.forms")

>> my_form = forms.form ()

>> MY_APP = Forms.Application.run (My_Form)

The effect of the root C # is exactly the same, in essence, they all call the .NET Framework, just use the language to tell Framework.

By the way: IronPython has a 0.71 version, but its page can't be opened, now ... dizzy ..

转载请注明原文地址:https://www.9cbs.com/read-40265.html

New Post(0)