2
你好我來自c/C++的世界,我有以下代碼片段,這樣初始化按鈕是個好主意嗎?在此先感謝初始化按鈕
private Button initializeButton() {
Button button = new Button();
button.FlatStyle = System.Windows.Forms.FlatStyle.System;
button.Location = new System.Drawing.Point(16, 16);
button.Name = "button";
button.Size = new System.Drawing.Size(168, 24);
button.TabIndex = 5;
button.Text = "button";
return button;
}
什麼是'portButton'?你是不是指'按鈕'? – Sorpigal
你是對的:) – geek