L
lich
Unregistered / Unconfirmed
GUEST, unregistred user!
不同语言中的语句:
1.循环
-------------------------------------------------
C++, C#:
for ( int i = 0;
i < n;
i++ )
{
}
-------------------------------------------------
Delphi, Delphi.Net:
for i := 0 to n - 1do
begin
end;
-------------------------------------------------
2.属性
-------------------------------------------------
C++: 不支持
-------------------------------------------------
Delphi:
myForm.Width := myForm.Width + 100;
-------------------------------------------------
C#:
obj.Text = "Hello";
-------------------------------------------------
3.事件
-------------------------------------------------
C++: 不支持
-------------------------------------------------
托管C++:
this->Load += new System::EventHandler(this, Form1_Load);
-------------------------------------------------
C#:
this.Load += new System.EventHandler(this.Form1_Load);
-------------------------------------------------
Delphi:
OnClose := FormClose;
-------------------------------------------------
Delphi.Net:
Include( Closing, TWinForm_Closing );
1.循环
-------------------------------------------------
C++, C#:
for ( int i = 0;
i < n;
i++ )
{
}
-------------------------------------------------
Delphi, Delphi.Net:
for i := 0 to n - 1do
begin
end;
-------------------------------------------------
2.属性
-------------------------------------------------
C++: 不支持
-------------------------------------------------
Delphi:
myForm.Width := myForm.Width + 100;
-------------------------------------------------
C#:
obj.Text = "Hello";
-------------------------------------------------
3.事件
-------------------------------------------------
C++: 不支持
-------------------------------------------------
托管C++:
this->Load += new System::EventHandler(this, Form1_Load);
-------------------------------------------------
C#:
this.Load += new System.EventHandler(this.Form1_Load);
-------------------------------------------------
Delphi:
OnClose := FormClose;
-------------------------------------------------
Delphi.Net:
Include( Closing, TWinForm_Closing );