Click here to Skip to main content
15,888,401 members
Articles / Programming Languages / C#

C# equivalent of VB's With keyword

Rate me:
Please Sign up or sign in to vote.
4.92/5 (12 votes)
27 May 2011CPOL 17K   4  
You are introducing a variable “p” in the local scope of the whole function :snot really.. you know you can use brackets anywhere inside the code to define subscopes, don't you:{var p = this.StatusProgressBar;p.IsIndeterminate = false;p.Visibility = Visibility.Visible;p.Minimum =...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Portugal Portugal
From the age of 15 I started programing in QBasic at home after several jobs I realized that what I wanted was to work with computers, so I joined a IT company, originally as a web designer, but thanks to my self learning abilities I made my way into the programmers team. Today I know VB, VBScript, Javascript, HTML, SQL , C# and C++... even if I never went to college.. Smile | :)

Comments and Discussions