What’s New in Visual Studio .NET 1.1?

his article assumes you are familiar with Visual Studio .NET 1.0 and it presents only the new features of the IDE (Integrated Development Environment) of Visual Studio .NET 1.1, for both C# and Visual Basic .NET. J# is not discussed because it was not part of Visual Studio .NET 1.0. In the interest of space, some minor cosmetic changes (such as reorganization of the Start page) are not listed.

The changes and innovations from Visual Studio .NET 1.0 to Visual Studio .NET 1.1 are mostly improvement to the overall development experience and automating routine activities such as implementing an interface or events. Visual Studio .NET 1.1 also introduces new capabilities such as build events and specifying supported runtime versions.

IntelliSense Enhancements
IntelliSense gets a boost with Visual Studio .NET 1.1, with many new features and capabilities. These features are clearly aimed at automating mundane programming tasks and have nothing to do with the new .NET 1.1 runtime.

IntelliSense History. Visual Studio .NET 1.1 keeps track of the most frequently used methods or properties of any type you interact with during code writing. When you type the dot (“.”) character to de-reference a type member, IntelliSense will suggest the member you are most likely to choose based on your history of using this type. If you start typing the member prefix, IntelliSense will refine its suggestion but still base it on history. For example, consider the Trace class, defined in the System.Diagnostics namespace. The Trace class is used to trace some information using the WriteLine() static method:

   Trace.WriteLine("I am here");

WriteLine() writes the content of the trace message to the Output window and appends a new line feed. The Trace class has a method called Write() that does not append the line feed, so you are far less likely to use it. In Visual Studio .NET 1.0, if you were to type “Trace.w” then IntelliSense would suggest Write() instead of WriteLine(), because it is first alphabetically. In Visual Studio .NET 1.1, if you use WriteLine() more frequently that you use Write(), then IntelliSense will suggest WriteLine() instead (see Figure 1).

C# Automatic Event Hookup and Handler Generation
.NET delegate-based events are a type safe way to connect an event publisher to an event subscriber. Because the exact signature of the event handling method is known, IntelliSense can generate the code creating a new delegate object targeting the event handling method, and even the event handling method itself.

For example, consider the MyPublisher class, which is used to publish events to interested subscribers about changes to the value of some number:

   public delegate void NumberChanged(int num);   public class MyPublisher   {      public event NumberChanged NumberChanged;      /* Other methods and members  */    } 

Suppose the class MySubscriber wants to subscribe to the event in the class constructor. When you type the += operator to assign into a delegate, IntelliSense will preset a ToolTip offering to add a new delegate of a matching type by pressing the Tab key. If you do not like the default target method name you can simply type a different method name in its place. If the target method does not exist, IntelliSense will offer to generate a handling method by that name by pressing the Tab key once more. This sequence is presented in Figure 3. This IntelliSense support only works with delegates defined as events (not mere delegates). Also worth mentioning is that there is no IntelliSense support for removing a subscription:

   public void UnSubscribe()   {      //This has no IntelliSense support:       publisher.NumberChanged -= new      NumberChanged(OnNumberChnaged);   } 
Project Settings
The most important change to the project settings options is support for different CLR versions (both for C# and Visual Basic .NET). For C# projects there are also build events and new compiler instructions. These compiler settings provide better affinity to the actual compiler switches available when using the compiler directly via the command line. Following is a rundown of the new features in the same order that they appear in the Project Properties Pages.

The .NET Framework Version dialog lets you select the CLR versions you wish to support. The available options are version 1.1 (the default) only, version 1.0 only, or both 1.0 and 1.1.

Specifying Supported Runtime Version. At present, Visual Studio .NET can only build applications targeting the highest CLR version installed on the machine (this may change in the future). Developers can indicate in the application configuration file which version or versions of the CLR (such as 1.0 or 1.1) the application supports. You can use Visual Studio .NET 1.1 to edit the application configuration file for supported CLR versions.

Build Events
Visual Studio .NET 1.1 introduces an old-time favorite and useful feature: build events. Build events let you specify command line instructions to execute in conjunction with the build process. In the Common Properties, there is a new item called Build Events (see Figure 7). The pre-build command line executes every time before the build starts. The post-build event is the more useful event. You may choose to provide command line instructions that automate parts or all of the deployment of the project’s output. You can have Visual Studio .NET 1.1 fire the post-build event always, on successful builds only (the default), or when the build process updates the project’s output. For example, if you develop a shared class library, your post build event can install the library in the GAC. To do so, you need to invoke the gacutil command line utility with the -i switch. Click the to bring up the Post-build Event Command line editor.

Tools Options
The Options under the Tools menu contain many new features and changes. Here is a list of the most important of these changes.

Build events let you specify command lines instructions to execute in conjunction with the build process.

Projects and Solutions Environment. The new checkbox, “Track Active Items in Solution Explorer” enables the Server Explorer to automatically track the item you are working with (see Figure 11). The Build and Run Options control what happens when you build and run your projects. The old option of saving all documents when a new build is launched is now split into two options: You can choose to save all changes to all documents and solution files (the default), or choose to save changes to open documents only. In addition, you can explicitly instruct Visual Studio .NET 1.1 to build only the active project or all projects whenever you build or start (by pressing F5) your project.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

homes in the real estate industry

Exploring the Latest Tech Trends Impacting the Real Estate Industry

The real estate industry is changing thanks to the newest technological advancements. These new developments — from blockchain and AI to virtual reality and 3D printing — are poised to change how we buy and sell homes. Real estate brokers, buyers, sellers, wholesale real estate professionals, fix and flippers, and beyond may

man on floor with data

DevX Quick Guide to Data Ingestion

One of the biggest trends of the 21st century is the massive surge in internet usage. With major innovations such as smart technology, social media, and online shopping sites, the internet has become an essential part of everyday life for a large portion of the population. Due to this internet

payment via phone

7 Ways Technology Has Changed Traditional Payments

In today’s digital world, technology has changed how we make payments. From contactless cards to mobile wallets, it’s now easier to pay for goods and services without carrying cash or using a checkbook. This article will look at seven of the most significant ways technology has transformed traditional payment methods.

©2023 Copyright DevX - All Rights Reserved. Registration or use of this site constitutes acceptance of our Terms of Service and Privacy Policy.

Sitemap