vb Source:
Imports System
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Namespace Microsoft.Samples.WinForms.VB.SimpleHelloWorld
Public Class SimpleHelloWorld
Inherits System.Windows.Forms.Form
'运行该应用程序
<STAThread()> Shared Sub Main()
System.Windows.Forms.Application.Run(New SimpleHelloWorld())
End Sub
Public Sub New()
MyBase.New()
Me.Text = "Hello World"
End Sub
End Class
End Namespace
C# Source:
namespace Microsoft.Samples.WinForms.Cs.SimpleHelloWorld {
using System;
using System.Windows.Forms;
public class SimpleHelloWorld : Form {
[STAThread]
public static int Main(string[] args) {
Application.Run(new SimpleHelloWorld());
return 0;
}
public SimpleHelloWorld() {
this.Text = "Hello World";
}
}
}