F#:为什么需要这些括号(语法)

F#: Why are these brackets necessary (syntax)

只是为了让我自己安心,我想知道为什么在最后一行,在我的 AssemblyInfo.fs 文件中,必须添加一个 () 才能编译。你怎么称呼这个语法?

namespace TestComComponentFSharp

open System.Reflection
open System.Runtime.CompilerServices
open System.Runtime.InteropServices

[<assembly: AssemblyTitle("TestComComponentFSharp")>]
[<assembly: ComVisible(true)>]
[<assembly: Guid("0B684F15-DC37-40C0-A785-EDF1A63BBAF5")>]
[<assembly: AssemblyKeyFile("KeyFile.snk")>]

[<assembly: AssemblyVersion("1.0.0.0")>]
[<assembly: AssemblyFileVersion("1.0.0.0")>]

()

您需要一些东西来应用这些程序集属性。什么是空的 () 或 do() 是为了。它被称为 "Empty Expression" - 它 returns 一个单位。