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

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

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

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

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

// Usage:
set.IsProperSupersetOf (otherSet)

Parametri

  • otherSet
    Tipo: Set<'T>

    Set di cui eseguire il test.

Valore restituito

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

Esempio

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

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

Output

  

Piattaforme

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

Informazioni sulla versione

F# Runtime

Supportato in: 2.0, 4.0

Silverlight

Supportato in: 3

Vedere anche

Riferimenti

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

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

Cronologia delle modifiche

Data

Cronologia

Motivo

Maggio 2010

Aggiunto esempio di codice.

Miglioramento delle informazioni.