Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
6
Reply
C# Equivalent of VB "WITH"
Gary King
Jun 24 2011 8:36 AM
1.5k
Reply
In C# is there an equivalent of the VB
With
/
End With
?
The only thing that I can find is
Using
, but this does not appear to work in the same way as
With
....
For example, in VB I can define which object I am working with and then not use the object name again - something like this....
With myObject
.Color = "Red"
.FontSize = "12"
End With
In the above example, I only have to type "myObject" once.
Is this also possible in C#?
Thanks
Gary
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
ListView
Difference b/w Loop