Equivelant With - End with

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,
Is there an equivelant in C# to the VB:

With controlName
.property = X
.Method
End with

Thanks very much in advance
Ant
 
=?Utf-8?B?QW50?= said:
Hi there,
Is there an equivelant in C# to the VB:

With controlName
.property = X
.Method
End with

As others answered, no. But if you have a LOT of properties to set you can "shortcut" like this:

{
ControlType x = controlName;
x.Property = xx;
x.Method();
}

Note the use of { and }


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Develop ASP.NET applications easier and in less time:
http://www.atozed.com/IntraWeb/
 
Back
Top