我想知道在C#中是否有一个命令,我可以在Delphi中使用像with command
?是否有一个相当于德尔福在C#中的“with”命令?
// like this :
with(textbox1)
{
.text="some text as text of text box";
.tag=1231;
}
在Delphi
//
with edit1 do
begin
text="some text as text of edit1";
tag=1231;
end;
任何C#基础教程应该以及如何使用它们... – RBA 2011-05-19 08:08:11
至于其他的答案都正确地指出了基本的关键字这个构造在C#中不存在,但是它存在于Visual Basic .NET中 – MattDavey 2011-05-19 08:10:41
@Matt更好的是,VB等价物具有解决Pascal“with”问题的大部分问题的语法。 – 2011-05-19 09:33:43