【发布时间】:2011-11-19 01:45:34
【问题描述】:
你好,我来自 c/c++ 的世界,我有以下 sn-p 的代码,用这种方式初始化按钮是个好主意吗?提前致谢
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是什么?你的意思是button?
标签: c#