Type Inference in .NET 2008 Part 2: Turning Type Inference On and Off

This entry is part of a series, Type Inference in .NET»

To turn on/off Type Inference in a normal .NET project (apart from a website), go into My Project, select the Compile tab, and you can choose Option infer from the drop down list.

To control it per file in VB.NET, you can write at the top Option Infer On or Option Infer Off.

In an ASP.NET website, there is a problem setting it – see this Microsoft Feedback Report. If anyone has any information on how to work around this, please post a comment.

Entries in this series:
  1. Type Inference in .NET 2008 Part 1: What is Type Inference?
  2. Type Inference in .NET 2008 Part 2: Turning Type Inference On and Off
Powered by Hackadelic Sliding Notes 1.6.5

No related posts.

Tags: , ,

One Response to “Type Inference in .NET 2008 Part 2: Turning Type Inference On and Off”

  1. Scooby says:

    The ASP.Net web site issue has been fixed, there’s a compiler option in the web.config.
    Your link to MS has the solution listed.
    Great blog… :)

Leave a Reply