我已经用所有希伯来字母命名了我的按钮对象(WinForms),然后添加了点击事件......它有效。
这是我错过的一些新功能吗?
this.כפתור = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// כפתור
//
this.כפתור.Location = new System.Drawing.Point(58, 48);
this.כפתור.Name = "כפתור";
this.כפתור.Size = new System.Drawing.Size(75, 23);
this.כפתור.TabIndex = 0;
this.כפתור.Text = "button1";
this.כפתור.UseVisualStyleBackColor = true;
this.כפתור.Click += new System.EventHandler(this.button1_Click);
private void button1_Click(object sender, EventArgs e)
{
כפתור.Text = "BLAH BLAH";
}
答案 0 :(得分:6)
C#(也是其他流行语言,如Java)使用unicode字符集作为其源代码。这不是什么新鲜事。
我建议你不要坚持使用英文字母,还要坚持使用英文名称作为标识符。它使程序命名与框架保持一致,源代码可由不懂语言的程序员维护。
答案 1 :(得分:0)
C#语言规范显示了您可以和不能用于标识符的内容。
http://msdn.microsoft.com/en-us/library/aa664670%28v=VS.71%29.aspx
它基本上说某些字符集允许使用unicode字符,而我假设包含希伯来语的集合在该列表中。 (我不知道希伯来字符集的集合名称)
答案 2 :(得分:0)
看起来unicode变量名已经支持了一段时间,尽管我从未使用它们。 http://jameskovacs.com/2006/02/16/unicode-variable-names/