Click here to Skip to main content
15,891,372 members
Articles / Programming Languages / C#

C# equivalent of VB's With keyword

Rate me:
Please Sign up or sign in to vote.
5.00/5 (6 votes)
27 May 2011CPOL 12.2K   1  
You can limit the scope of 'p' inside your function:private void Whatever() { DoStuffHere(); // 'p' is not in scope. { var p = this.StatusProgressBar; // 'p' is in scope. p.IsIndeterminate = false; p.[etc] } // 'p' is not in...

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
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions