[フレーム][フレーム]

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.

1 Min Read
ITPro Today logo in a gray background | ITPro Today

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.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

Enterprise Connect 2026 – All In on What’s Next

Enterprise Connect makes its boldest move yet—bringing two decades of industry leadership to vibrant Las Vegas, March 10-12, 2026. This isn't just a venue change—it's a complete reimagining of how we'll shape the future of enterprise communications, CX, and the workplace.

Passes & Pricing

AltStyle によって変換されたページ (->オリジナル) /