Core.AutoOpenAttribute Class (F#)

This attribute is used for two purposes. When applied to an assembly, it must be given a string argument, and this argument must indicate a valid module or namespace in that assembly. Source code files compiled with a reference to this assembly are processed in an environment where the given path is automatically oepned.

Namespace/Module Path: Microsoft.FSharp.Core

Assembly: FSharp.Core (in FSharp.Core.dll)

[<AttributeUsage(5, AllowMultiple = true)>]
[<Sealed>]
type AutoOpenAttribute =
 class
  new AutoOpenAttribute : string -> AutoOpenAttribute
  new AutoOpenAttribute : unit -> AutoOpenAttribute
  member this.Path :  string
 end

Remarks

When applied to a module within an assembly, then the attribute must not be given any arguments. When the enclosing namespace is opened in user source code, the module is also implicitly opened.

You can also use the short form of the name, AutoOpen.

Constructors

Member

Description

new

Creates an attribute used to mark a namespace or module path to be automatically opened when an assembly is referenced

Instance Members

Member

Description

Path

Indicates the namespace or module to be automatically opened when an assembly is referenced or an enclosing module opened.

Platforms

Windows 7, Windows Vista SP2, Windows XP SP3, Windows XP x64 SP2, Windows Server 2008 R2, Windows Server 2008 SP2, Windows Server 2003 SP2

Version Information

F# Runtime

Supported in: 2.0, 4.0

Silverlight

Supported in: 3

See Also

Reference

Microsoft.FSharp.Core Namespace (F#)