Thursday, May 27, 2010

Visual C++ Compiler and Linker


auto Keyword

The auto keyword has a new purpose. Use the default meaning of the auto keyword to declare a variable whose type is deduced from the initialization expression in the declaration of the variable. The /Zc:auto compiler option invokes either the new or the previous meaning of the auto keyword.

decltype Type Specifier

The decltype type specifier returns the type of a specified expression. Use the decltype type specifier in combination with the auto keyword to declare a type that is either complex or known only to the compiler. For example, use the combination to declare a template function whose return type depends on the types of its template arguments. Or, declare a template function that calls another function, and then returns the return type of the called function.

Lambda Expressions

Lambda functions have a function body but no name. Lambda functions combine the best characteristics of function pointers and function objects.

Use a lambda function by itself, as a template function parameter instead of a function object, or together with the auto keyword to declare a variable whose type is a lambda.

Rvalue Reference

The rvalue reference declarator (&&) declares a reference to an rvalue. An rvalue reference lets you use move semantics and perfect forwarding to write more efficient constructors, functions, and templates.

static_assert Declaration

A static_assert declaration tests a software assertion at compile time, unlike other assertion mechanisms that test at run time. If the assertion fails, the compilation fails and a specified error message is issued.

nullptr and __nullptr Keywords

The Visual C++ compiler lets you use the nullptr keyword with native code or with managed code. The nullptr keyword indicates that an object handle, interior pointer, or native pointer type does not point to an object. The compiler interprets nullptr to be managed code when you use the /clr compiler option, and native code when you do not use the /clr option.

The Microsoft-specific __nullptr keyword has the same meaning as nullptr, but it applies to native code only. If you compile native C/C++ code by using the /clrcompiler option, the compiler cannot determine whether the nullptr keyword is a native or a managed term. To make your intention clear to the compiler, use thenullptr keyword to specify the managed term, and __nullptr to specify the native term.

/Zc:trigraphs Compiler Option

By default, support for trigraphs is disabled. Use the /Zc:trigraphs compiler option to enable trigraphs support.

A trigraph consists of two consecutive question marks (??) followed by a unique third character. The compiler replaces a trigraph with the corresponding punctuation character. For example, the compiler replaces the ??= trigraph with the # (number sign) character. Use trigraphs in C source files that use a character set that does not contain certain punctuation characters.

New Profile-Guided Optimization Option

PogoSafeMode is a new profile-guided optimization option that lets you specify whether to use safe mode or fast mode when you optimize your application. Safe mode is thread-safe, but it is slower than fast mode. Fast mode is the default behavior.

New Common Language Runtime (CLR) Option /clr:nostdlib

A new option is added for /clr (Common Language Runtime Compilation). If different versions of the same libraries are included, a compile error is issued. The new option lets you exclude the default CLR libraries so that your program can use a specified version.

New pragma directive detect_mistmatch

The pragma directive detect_mismatch lets you put a tag in your files that is compared to other tags that have the same name. If there are multiple values for the same name, the linker issues an error.

Visual C++ Projects and the Build System

MSBuild

Visual C++ solutions and projects are now built by using MSBuild.exe, which replaces VCBuild.exe. MSBuild is the same flexible, extensible, XML-based build tool that is used by the other Visual Studio languages and project types. Because of this change, Visual C++ project files now use an XML file format and have the .vcxproj file name extension. Visual C++ project files from earlier versions of Visual Studio are automatically converted to the new file format. For more information, see MSBuild (Visual C++).

VC++ Directories

The VC++ directories setting is now located in two places. Use project property pages to set per-project values for VC++ directories. Use the Property Managerand a property sheet to set global, per-configuration values for VC++ directories.

Project-to-Project Dependencies

In earlier releases, defined dependencies between projects were stored in the solution file. When these solutions are converted to the new project file format, dependencies are converted to project-to-project references. This change can affect applications because the concepts of solution dependencies and project-to-project references are different.

Macros and Environment Variables

The new _ITERATOR_DEBUG_LEVEL macro invokes debugging support for iterators. Use this macro instead of the older _SECURE_SCL and_HAS_ITERATOR_DEBUGGING macros.

Visual C++ Libraries

Concurrency Runtime Libraries

The Concurrency Runtime framework supports applications and components that run simultaneously, and is the framework for programming concurrent applications in Visual C++. To support concurrent-application programming, the Parallel Patterns Library (PPL) provides general-purpose containers and algorithms for performing fine-grained parallelism. The Asynchronous Agents Library provides an actor-based programming model and message passing interfaces for coarse-grained dataflow and pipelining tasks.

Standard C++ Library

The following list describes many of the changes that have been made to the Standard C++ Library.

  • The new rvalue reference C++ language feature has been used to implement move semantics and perfect forwarding for many functions in the Standard Template Library. Move semantics and perfect forwarding greatly improve the performance of operations that allocate or assign variables or parameters.

  • Rvalue references are also used to implement the new unique_ptr class, which is a safer smart pointer type than the auto_ptr class. The unique_ptr class ismovable but not copyable, implements strict ownership semantics without affecting safety, and works well with containers that are aware of rvalue references. The auto_ptr class is deprecated.

  • Fifteen new functions, for example, find_if_not, copy_if, and is_sorted, have been added to the header.

  • In the header, the new make_shared function is a convenient, robust, and efficient way to make a shared pointer to an object at the same time the object is constructed.

  • Singly linked lists are supported by the header.

  • The new cbegin, cend, crbegin, and crend member functions provide a const_iterator that moves forward or backward through a container.

  • The header and related templates support the processing of low-level system errors.

  • Members of the exception_ptr class can be used to transport exceptions between threads.

  • The header supports converting various encodings of Unicode characters to other encodings.

  • The header defines several templates that help allocate and free memory blocks for node-based containers.

  • There are numerous updates to the header.

Microsoft Foundation Class (MFC) Library

Windows 7 Features

MFC supports many Windows 7 features, for example, the Ribbon user interface (UI), the Taskbar, jump lists, tabbed thumbnails, thumbnail previews, the progress bar, icon overlay, and search indexing. Because MFC automatically supports many Windows 7 features, you may not have to modify your existing application. To support other features in new applications, use the MFC Application Wizard to specify the functionality you want to use.

MultiTouch Awareness

MFC supports applications that have a MultiTouch user interface, for example, applications that are written for the Microsoft Surface operating system. A MultiTouch application can handle Windows touch messages and gesture messages, which are combinations of touch messages. Just register your application for touch and gesture events and the operating system will route MultiTouch events to your event handlers.

High-DPI Awareness

By default, MFC applications are now High-DPI-aware. If an application is High-DPI (high dots per inch) aware, the operating system can scale windows, text, and other UI elements to the current screen resolution. This means that a scaled image is more likely to be correctly laid out, and not clipped or pixelated.

Restart Manager

The restart manager automatically saves documents and restarts your application if it unexpectedly closes or restarts. For example, you can use the restart manager to start your application after it is closed by an automatic update. For more information about how to configure your application to use the restart manager, see How to: Add Restart Manager Support.

CTaskDialog

The CTaskDialog class can be used instead of the standard AfxMessageBox message box. The CTaskDialog class displays and gathers more information than the standard message box does.

SafeInt Library

The new SafeInt Library performs safe arithmetic operations that account for integer overflow. This library also compares different kinds of integers.

New Active Template Library (ATL) macros

New macros have been added to ATL to expand the functionality of PROP_ENTRY_TYPE and PROP_ENTRY_TYPE_EX. PROP_ENTRY_INTERFACE andPROP_ENTRY_INTERFACE_EX let you add a list of valid CLSIDs. PROP_ENTRY_INTERFACE_CALLBACK and PROP_ENTRY_INTERFACE_CALLBACK_EX let you specify a callback function to determine whether a CLSID is valid.

/analyze Warnings

Most /analyze (Enterprise Code Analysis) warnings have been removed from the C Run-Time (CRT), MFC, and ATL libraries.

IDE

In Visual C++ 2010, the integrated development environment (IDE) has significant improvements in performance, accuracy, scalability, and tools to help you be productive.

Improved IntelliSense

IntelliSense for Visual C++ has been completely redesigned to be faster, more accurate, and able to handle larger projects. To achieve this improvement, the IDE makes a distinction between how a developer views and modifies source code, and how the IDE uses source code and project settings to build a solution.

Because of this separation of duties, browsing features such as Class View and the new Navigate To dialog box are handled by a system that is based on a new SQL Server desktop database (.sdf) file that replaces the old no compile browse (.ncb) file. IntelliSense features such as Quick Information, Auto Completion, and Parameter Help parse translation units only when required. Hybrid features such as the new Call Hierarchy window use a combination of the browse and IntelliSense features.

Because IntelliSense processes only the information that you require at the moment, the IDE is more responsive. Also, because information is more up to date, IDE views and windows are more accurate. Finally, because the IDE infrastructure is better organized, more capable, and more scalable, it can handle larger projects.

Improved IntelliSense Errors

The IDE better detects errors that could cause a loss of IntelliSense and displays red wavy underlines under them. In addition, the IDE reports IntelliSense errors to the Error List Window. To display the code that is causing the problem, double-click the error in the Error List Window.

#include Auto-Complete Feature

The IDE supports auto-completion for the #include keyword. When you type #include, the IDE creates a drop-down list box of valid header files. If you continue by typing a file name, the IDE filters the list based on your entry. At any point, you can select from the list the file you want to include. This lets you quickly include files without knowing the exact file name.

Navigate To

The Navigate To dialog box lets you search for all symbols and files in your project that match a specified string. Search results are immediately revised as you type additional characters in your search string. The Results feedback field tells you the number of items found and helps you decide whether to constrain your search. The Kind/Scope, Location, and Preview feedback fields help you disambiguate items that have similar names. In addition, you can extend this feature to support other programming languages.

Parallel Debugging and Profiling

The Visual Studio debugger is aware of the Concurrency Runtime and helps you troubleshoot parallel processing applications. You can use the new concurrency profiler tool to visualize the overall behavior of your application. Also, you can use new tool windows to visualize the state of tasks and their call stacks.

Ribbon Designer

The Ribbon Designer is a graphical editor that lets you create and modify an MFC ribbon UI. The final ribbon UI is represented by an XML-based resource file (.mfcribbon-ms). For existing applications, you can capture your current ribbon UI by temporarily adding a few lines of code and then invoking the Ribbon Designer. After the ribbon resource file is created, you can replace your handwritten ribbon UI code with a few statements that load the ribbon resource.

Call Hierarchy

The Call Hierarchy window lets you navigate to all functions that are called by a particular function, or to all functions that call a particular function.

Tools

MFC Class Wizard

Visual C++ 2010 brings back the well-regarded MFC Class Wizard tool. The MFC Class Wizard is a convenient way to add classes, messages, and variables to a project without having to manually modify sets of source files.

ATL Control Wizard

The ATL Control Wizard no longer automatically populates the ProgID field. If an ATL control does not have a ProgID, other tools may not work with it. One example of a tool that requires controls to have a ProgID is the Insert Active Control dialog box. For more information about the dialog box, see Insert ActiveX Control Dialog Box.

Microsoft Macro Assembler Reference

The addition of the YMMWORD data type supports the 256-bit multimedia operands that are included in the Intel Advanced Vector Extensions (AVX) instructions.

What's New in the .NET Framework 4

What's New in the .NET Framework 4

This topic contains information about key features and improvements in the .NET Framework version 4. This topic does not provide comprehensive information about all new features and is subject to change.

The .NET Framework 4 introduces an improved security model. For more information, see Security Changes in the .NET Framework 4.

Other new features and improvements in the .NET Framework 4 are described in the following sections:

Application Compatibility and Deployment

The .NET Framework 4 is highly compatible with applications that are built with earlier .NET Framework versions, except for some changes that were made to improve security, standards compliance, correctness, reliability, and performance.

The .NET Framework 4 does not automatically use its version of the common language runtime to run applications that are built with earlier versions of the .NET Framework. To run older applications with .NET Framework 4, you must compile your application with the target .NET Framework version specified in the properties for your project in Visual Studio, or you can specify the supported runtime with the Element in an application configuration file.

If your application or component does not work after .NET Framework 4 is installed, please submit a bug on the Microsoft Connect Web site. You can test compatibility as described in the .NET Framework 4 Application Compatibility topic and learn about new features by using the Visual Studio 2010 and .NET Framework 4 Walkthroughs. For additional information and known migration issues, visit the .NET Framework Compatibility blog.

The following sections describe deployment improvements.

Client Profile

The .NET Framework 4 Client Profile supports more platforms than in previous versions and provides a fast deployment experience for your applications. Several new project templates now target the Client Profile by default. For more information, see .NET Framework Client Profile.

In-Process Side-by-Side Execution

This feature enables an application to load and start multiple versions of the .NET Framework in the same process. For example, you can run applications that load add-ins (or components) that are based on the .NET Framework 2.0 SP1 and add-ins that are based on the .NET Framework 4 in the same process. Older components continue to use the older .NET Framework version, and new components use the new .NET Framework version. For more information, see In-Process Side-by-Side Execution.

Back to top

Core New Features and Improvements

The following sections describe new features and improvements provided by the common language runtime and the base class libraries.

Diagnostics and Performance

Earlier versions of the .NET Framework provided no way to determine whether a particular application domain was affecting other application domains, because the operating system APIs and tools, such as the Windows Task Manager, were precise only to the process level. Starting with the .NET Framework 4, you can get processor usage and memory usage estimates per application domain.

You can monitor CPU and memory usage of individual application domains. Application domain resource monitoring is available through the managed and native hosting APIs and event tracing for Windows (ETW). When this feature has been enabled, it collects statistics on all application domains in the process for the life of the process. See the new AppDomain.MonitoringIsEnabled property.

You can now access the ETW events for diagnostic purposes to improve performance. For more information, see CLR ETW Events and Controlling .NET Framework Logging. Also see Performance Counters and In-Process Side-By-Side Applications.

The System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute attribute enables managed code to handle exceptions that indicate corrupted process state.

Garbage Collection

The .NET Framework 4 provides background garbage collection. This feature replaces concurrent garbage collection in previous versions and provides better performance. For more information, see Fundamentals of Garbage Collection.

Code Contracts

Code contracts let you specify contractual information that is not represented by a method's or type's signature alone. The new System.Diagnostics.Contractsnamespace contains classes that provide a language-neutral way to express coding assumptions in the form of preconditions, postconditions, and object invariants. The contracts improve testing with run-time checking, enable static contract verification, and support documentation generation. For more information, see Code Contracts.

Design-Time-Only Interop Assemblies

You no longer have to ship primary interop assemblies (PIAs) to deploy applications that interoperate with COM objects. In the .NET Framework 4, compilers can embed type information from interop assemblies, selecting only the types that an application (for example, an add-in) actually uses. Type safety is ensured by the common language runtime. See Using COM Types in Managed Code and Walkthrough: Embedding Type Information from Microsoft Office Assemblies (C# and Visual Basic).

Dynamic Language Runtime

The dynamic language runtime (DLR) is a new runtime environment that adds a set of services for dynamic languages to the CLR. The DLR makes it easier to develop dynamic languages to run on the .NET Framework and to add dynamic features to statically typed languages. To support the DLR, the new System.Dynamicnamespace is added to the .NET Framework.

The expression trees are extended with new types that represent control flow, for example, System.Linq.Expressions.LoopExpression andSystem.Linq.Expressions.TryExpression. These new types are used by the dynamic language runtime (DLR) and not used by LINQ.

In addition, several new classes that support the .NET Framework infrastructure are added to the System.Runtime.CompilerServices namespace. For more information, see Dynamic Language Runtime Overview.

Covariance and Contravariance

Several generic interfaces and delegates now support covariance and contravariance. For more information, see Covariance and Contravariance in Generics.

BigInteger and Complex Numbers

The new System.Numerics.BigInteger structure is an arbitrary-precision integer data type that supports all the standard integer operations, including bit manipulation. It can be used from any .NET Framework language. In addition, some of the new .NET Framework languages (such as F# and IronPython) have built-in support for this structure.

The new System.Numerics.Complex structure represents a complex number that supports arithmetic and trigonometric operations with complex numbers.

Tuples

The .NET Framework 4 provides the System.Tuple class for creating tuple objects that contain structured data. It also provides generic tuple classes to support tuples that have from one to eight components (that is, singletons through octuples). To support tuple objects that have nine or more components, there is a generic tuple class with seven type parameters and an eighth parameter of any tuple type.

File System Enumeration Improvements

New file enumeration methods improve the performance of applications that access large file directories or that iterate through the lines in large files. For more information, see How to: Enumerate Directories and Files.

Memory-Mapped Files

The .NET Framework now supports memory-mapped files. You can use memory-mapped files to edit very large files and to create shared memory for interprocess communication.

64-Bit Operating Systems and Processes

You can identify 64-bit operating systems and processes with the Environment.Is64BitOperatingSystem and Environment.Is64BitProcess properties.

You can specify a 32-bit or 64-bit view of the registry with the Microsoft.Win32.RegistryView enumeration when you open base keys.

Other New Features

The following list describes additional new capabilities, improvements, and conveniences. Several of these are based on customer suggestions.

Back to top

Managed Extensibility Framework

The Managed Extensibility Framework (MEF) is a new library in the .NET Framework 4 that helps you build extensible and composable applications. MEF enables you to specify points where an application can be extended, to expose services to offer to other extensible applications and to create parts for consumption by extensible applications. It also enables easy discoverability of available parts based on metadata, without the need to load the assemblies for the parts. For more information, see Managed Extensibility Framework. For a list of the MEF types, see the System.ComponentModel.Composition namespace.

Back to top

Parallel Computing

The .NET Framework 4 introduces a new programming model for writing multithreaded and asynchronous code that greatly simplifies the work of application and library developers. The new model enables developers to write efficient, fine-grained, and scalable parallel code in a natural idiom without having to work directly with threads or the thread pool. The new System.Threading.Tasks namespace and other related types support this new model. Parallel LINQ (PLINQ), which is a parallel implementation of LINQ to Objects, enables similar functionality through declarative syntax. For more information, see Parallel Programming in the .NET Framework.

Back to top

Networking

Networking improvements include the following:

Back to top

Web

ASP.NET version 4 introduces new features in the following areas:

  • Core services, including a new API that lets you extend caching, support for compression for session-state data, and a new application preload manager (autostart feature).

  • Web Forms, including more integrated support for ASP.NET routing, enhanced support for Web standards, updated browser support, new features for data controls, and new features for view state management.

  • Web Forms controls, including a new Chart control.

  • MVC, including new helper methods for views, support for partitioned MVC applications, and asynchronous controllers.

  • Dynamic Data, including support for existing Web applications, support for many-to-many relationships and inheritance, new field templates and attributes, and enhanced data filtering.

  • Microsoft Ajax, including additional support for client-based Ajax applications in the Microsoft Ajax Library.

  • Visual Web Developer, including improved IntelliSense for JScript, new auto-complete snippets for HTML and ASP.NET markup, and enhanced CSS compatibility.

  • Deployment, including new tools for automating typical deployment tasks.

  • Multi-targeting, including better filtering for features that are not available in the target version of the .NET Framework.

For more information about these features, see What's New in ASP.NET 4 and Visual Web Developer.

Back to top

Client

Windows Presentation Foundation

In the .NET Framework 4, Windows Presentation Foundation (WPF) contains changes and improvements in many areas, including controls, graphics, and XAML. For more information, see What's New in WPF Version 4.

Back to top

Data

ADO.NET

ADO.NET provides new features for the Entity Framework, including persistence-ignorant objects, functions in LINQ queries, and customized object layer code generation. For more information, see What's New in ADO.NET.

Dynamic Data

For ASP.NET 4, Dynamic Data has been enhanced to give you even more power for quickly building data-driven Web sites. This includes the following:

  • Automatic validation that is based on constraints that are defined in the data model.

  • The ability to easily change the markup that is generated for fields in the GridView and DetailsView controls by using field templates that are part of a Dynamic Data project.

For more information, see What's New in ASP.NET 4 and Visual Web Developer.

WCF Data Services

ADO.NET Data Service has been renamed to WCF Data Services, and has the following new features

  • Data binding.

  • Counting entities in an entity set.

  • Server-driven paging.

  • Query projections.

  • Custom data service providers.

  • Streaming of binary resources.

For more information, see What's New in WCF Data Services.

Back to top

Windows Communication Foundation

Windows Communication Foundation (WCF) provides the following improvements:

  • Configuration-based Activation: Removes the requirement for having an .svc file.

  • System.Web.Routing Integration: Allows you to have more control over your service's URL (extensionless URLs).

  • Multiple IIS Site Bindings Support: Allows you to have multiple base addresses with the same protocol on the same Web site.

  • Routing Service: Allows you to route messages based on content.

  • Support for WS-Discovery: Allows you to create and search for discoverable services.

  • Standard Endpoints: Predefined endpoints that allow you to specify only certain properties.

  • Workflow Services: Integrates WCF and WF by providing activities to send and receive messages, the ability to correlate messages based on content, and a workflow service host.

  • WCF REST features:

    • Web HTTP Caching: Allows caching of Web HTTP service responses.

    • Web HTTP Formats Support: Allows you to dynamically determine the best format for a service operation to respond in.

    • Web HTTP Services Help Page: Provides an automatic help page for Web HTTP services, similar to the WCF service help page.

    • Web HTTP Error Handling: Allows Web HTTP Services to return error information in the same format as the operation.

    • Web HTTP Cross-Domain JavaScript Support: Allows use of JSONP.

  • Simplified Configuration: Reduces the amount of configuration a service requires

For more information, see What's New in Windows Communication Foundation.

Back to top

Windows Workflow Foundation

Windows Workflow Foundation provides improvements in the following areas:

  • Improved Workflow Activity Model: The Activity class provides the base abstraction of workflow behavior.

  • Rich Composite Activity Options: Workflows benefit from new flow-control activities that model traditional flow-control structures, such as Flowchart, TryCatch, and Switch.

  • Expanded Built-In Activity Library: New features of the activity library include new flow-control activities, activities for manipulating member data, and activities for controlling transactions.

  • Explicit Activity Data Model: New options for storing or moving data include variable and directional arguments.

  • Enhanced Hosting, Persistence, and Tracking Options: Hosting enhancements include more options for running workflows, explicit persistence using the Persist activity, persisting without unloading, preventing persistence using no-persist zones, using ambient transactions from the host, recording tracking information to the event log, and resuming pending workflows using Bookmark.

  • Easier ability to extend the WF designer: The new WF Designer is built on Windows Presentation Foundation (WPF) and provides an easier model to use when rehosting the WF Designer outside of Visual Studio.

For more information, see What's New in Windows Workflow Foundation.

Back to top

What's New in Visual Basic 2010


Visual Studio 2010 - Visual Basic
What's New in Visual Basic 2010
This page lists the new and enhanced features available in Visual Basic 2010. Click the links in the following sections to read more about a feature.
Visual Basic Compiler and Language


Auto-Implemented Properties

Auto-implemented properties provide a shortened syntax that enables you to quickly specify a property of a class without having to write code to Get and Set the property. For more information, see Auto-Implemented Properties (Visual Basic).

Collection Initializers

Collection initializers provide a shortened syntax that enables you to create a collection and populate it with an initial set of values. Collection initializers are useful when you are creating a collection from a set of known values, for example, a list of menu options or categories. For more information, see Collection Initializers Overview (Visual Basic).

Implicit Line Continuation

In many cases, implicit line continuation enables you to continue a statement on the next consecutive line without using the underscore character (_). For a list of all the cases in which you can omit an underscore character, see Statements in Visual Basic.

Multiline Lambda Expressions and Subroutines

Lambda expression support has been expanded to support subroutines in addition to multiline lambda functions and subroutines. For more information, seeLambda Expressions.

New Command-Line Option for Specifying a Language Version

The /langversion command-line option causes the compiler to accept only syntax that is valid in the specified version of Visual Basic.

Type Equivalence Support

You can now deploy an application that has embedded type information instead of type information that is imported from a Primary Interop Assembly (PIA). With embedded type information, your application can use types in a runtime without requiring a reference to the runtime assembly. If various versions of the runtime assembly are published, the application that contains the embedded type information can work with the various versions without having to be recompiled. For more information, see /link (Visual Basic). For an example, see Walkthrough: Embedding Types from Managed Assemblies (C# and Visual Basic).

Dynamic Support

Visual Basic binds to objects from dynamic languages such as IronPython and IronRuby. For more information, see Working with Dynamic Objects (Visual Basic) andWalkthrough: Creating and Using Dynamic Objects (C# and Visual Basic).

Covariance and Contravariance

Covariance enables you to use a more derived type than that specified by the generic parameter, whereas contravariance enables you to use a less derived type. This allows for implicit conversion of classes that implement variant interfaces and provides more flexibility for matching method signatures with variant delegate types. You can create variant interfaces and delegates by using the new In and Out language keywords. The .NET Framework also introduces variance support for several existing generic interfaces and delegates, including the IEnumerable(Of T) interface and the Func(Of TResult) and Action(Of T) delegates. For more information, see Covariance and Contravariance (C# and Visual Basic).
Integrated Development Environment


The following sections describe enhancements to the Visual Studio integrated development environment (IDE).

Navigate To

You can use the Navigate To feature to search for a symbol or file in source code. You can search for keywords that are contained in a symbol by using Camel casing and underscore characters to divide the symbol into keywords.
For more information, see How to: Search for Objects, Definitions, and References (Symbols).

Highlighting References

When you click a symbol in source code, all instances of that symbol are highlighted in the document.
For many control structures, when you click a keyword, all of the keywords in the structure are highlighted. For instance, when you click If in an If...Then...Elseconstruction, all instances of If, Then, ElseIf, Else, and End If in the construction are highlighted.
To move to the next or previous highlighted symbol, you can use CTRL+SHIFT+DOWN ARROW or CTRL+SHIFT+UP ARROW. For more information, see How to: Use Reference Highlighting.

Generate From Usage

The Generate From Usage feature enables you to use classes and members before you define them. You can generate a stub for any class, constructor, method, property, field, or enum that you want to use but have not yet defined. You can generate new types and members without leaving your current location in code. This minimizes interruption to your workflow.
Generate From Usage supports programming styles such as test-first development. For more information, see Generate From Usage.

IntelliSense Suggestion Mode

IntelliSense now provides two alternatives for IntelliSense statement completion: completion mode and suggestion mode. Suggestion mode is used when classes and members are used before they are defined. For more information, see List Members.
Sample Applications


Visual Basic includes new sample applications that demonstrate the following features: auto-implemented properties, implicit line continuation, collection initializers, covariance and contravariance, and multiline lambda expressions and subroutines. For information about Visual Basic language samples and how to access them, see Visual Basic Language Samples.