I was wondering if there is a command in C# which I can use like with command
in Delphi?
// like this :
with(textbox1)
{
.text=\"some text as
No, it does not exist in C#, however, when creating an object, you can do like this:
var textbox1 = new TextBox {
Text = "some text as text of text box";
Tag = 1231
};
There's something called using, but compared to Delphi/Pascal it's works more like try/finally.
Not for already created instances.
However, when you create a new instance you can do:
var textbox1 =
new Textbox
{
Text = "some text as text of text box",
Tag = 1231
};
No, that does not exist in C#.
No but depending on what you are trying to do, the following would work:
TextBox t = textbox1;
t.text="some text as text of text box";
t.tag=1231;