Equivelant With - End with

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
 
C

Chad Z. Hower aka Kudzu

=?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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top