Moh*_*sen 10 .net c# delphi .net-4.0 c#-4.0
我想知道在C#中是否有一个命令,我可以with command在Delphi中使用它?
// like this :
with(textbox1)
{
.text="some text as text of text box";
.tag=1231;
}
Run Code Online (Sandbox Code Playgroud)
//在Delphi中
with edit1 do
begin
text="some text as text of edit1";
tag=1231;
end;
Run Code Online (Sandbox Code Playgroud)
Ale*_*Aza 14
不适用于已创建的实例.
但是,在创建新实例时,您可以执行以下操作:
var textbox1 =
new Textbox
{
Text = "some text as text of text box",
Tag = 1231
};
Run Code Online (Sandbox Code Playgroud)