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/
 

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

Similar Threads

Checking if string 2
C# equivelent of VBA "with..end with" statement 15
VB's With keyword 10
Modal in C# 3
C# equivelant of vb6 app.name 1
Debug window 3
ShellExecuteEx 3
(byte)0 - What exactly does this syntax mean? 6

Back
Top