Abstract type: Difference between revisions

Content added Content deleted
Line 358: Line 358:
}</lang>
}</lang>
=={{header|F Sharp|F#}}==
=={{header|F Sharp|F#}}==
A type with only abstract members and without constructors is an '''interface''' (when not marked with the <code>AbstractClass</code> attribte). Example:
A type with only abstract members and without constructors is an '''interface''' (when not marked with the <code>AbstractClass</code> attribute). Example:
<lang fsharp>type Shape =
<lang fsharp>type Shape =
abstract Perimeter: unit -> float
abstract Perimeter: unit -> float