Metodo Set.IsProperSubsetOf<'T> (F#)

Restituisce true se tutti gli elementi del primo set sono presenti nel secondo e almeno un elemento del secondo non è presente nel primo.

Percorso di spazio dei nomi/modulo: Microsoft.FSharp.Collections

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

// Signature:
member this.IsProperSubsetOf : Set<'T> -> bool (requires comparison)

// Usage:
set.IsProperSubsetOf (otherSet)

Parametri

  • otherSet
    Tipo: Set<'T>

    Set di cui eseguire il test.

Valore restituito

true se questo set è un subset valido di otherSet.In caso contrario, restituisce false.

Esempio

Nel codice riportato di seguito viene illustrato l'utilizzo del metodo IsProperSubsetOf.

let set1 = Set.ofList [ 1 .. 6 ]
let set2 = Set.ofList [ 1 .. 5 ]
let set3 = Set.ofList [ 1 .. 6 ]
let set4 = Set.ofList [ 5 .. 10 ]
printfn "%A is a proper subset of %A: %b" set2 set1 (set2.IsProperSubsetOf set1)
printfn "%A is a proper subset of %A: %b" set3 set1 (set3.IsProperSubsetOf set1) 
printfn "%A is a proper subset of %A: %b" set4 set1 (set4.IsProperSubsetOf set1) 

Output

  

Piattaforme

Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

Informazioni sulla versione

Versioni della libreria di base F#

Supportato in: 2,0, 4,0, portabile

Vedere anche

Riferimenti

Classe Collections.Set<'T> (F#)

Spazio dei nomi Microsoft.FSharp.Collections (F#)