The Visual Basic .NET and C# Surrounding CodeThe Visual Basic .NET and C# Surrounding CodeThe Visual Basic .NET and C# Surrounding Code
Here are the few additional lines of code you need to make the solution work.
August 15, 2004
The first lines of Listing 6 and Listing 7 are optional shorthand statements for declaring that the application uses one or more classes in the DirectoryServices namespace. In plain English, if you don't include these optional statements in the code, you would have to use longhand for writing each line of code. For example, on the first lines of Listing 3 and Listing 4, you would have to change DirectoryEntry to System.DirectoryServices.DirectoryEntry. The Module keyword in Listing 6 and the class keyword in Listing 7 specify names of code blocks, and the surrounding brackets define code in the blocks. The Sub keyword with the Main() parameter in Listing 6 and the static and void keywords with the Main(string[] args) parameter in Listing 7 specify the starting points (in programming terms, the entry points) for the code in the applications. For more information about this surrounding code, see the Visual Basic .NET and C# Programmer's Reference guides in the Microsoft Developer Network (MSDN) Library.
About the Author
You May Also Like
ITPro Today's 2025 IT Priorities Report
Aug 8, 2025|2 Min ReadEdge Computing Trends: Adoption, Challenges, and Future Outlook
Jul 15, 2025|2 Min ReadITPro Today’s 2024 State of DevOps Report
Dec 16, 2024|2 Min ReadBCDR Basics: A Quick Reference Guide for Business Continuity & Disaster Recovery
Oct 10, 2024|1 Min Read
Recent What Is
Enterprise Connect 2026 – All In on What’s Next