Condividi tramite


Procedura: rimuovere elementi dai controlli DomainUpDown Windows Form

È possibile rimuovere elementi dal controllo DomainUpDown Windows Form chiamando il metodo Remove o RemoveAt della classe DomainUpDown.DomainUpDownItemCollection. Il metodo Remove rimuove un elemento specifico, mentre il metodo RemoveAt rimuove un elemento in base alla posizione.

Per rimuovere un elemento

  • Utilizzare il metodo Remove della classe DomainUpDown.DomainUpDownItemCollection per rimuovere un elemento in base al nome.

    DomainUpDown1.Items.Remove("noodles")
    
    domainUpDown1.Items.Remove("noodles");
    
    domainUpDown1->Items->Remove("noodles");
    

    -o-

  • Utilizzare il metodo RemoveAt per rimuovere un elemento in base alla posizione.

    ' Removes the first item in the list.
    DomainUpDown1.Items.RemoveAt(0)
    
    // Removes the first item in the list.
    domainUpDown1.Items.RemoveAt(0);
    
    // Removes the first item in the list.
    domainUpDown1->Items->RemoveAt(0);
    

Vedere anche

Riferimenti

Cenni preliminari sul controllo DomainUpDown (Windows Form)

DomainUpDown

DomainUpDown.DomainUpDownItemCollection.Remove

DomainUpDown.DomainUpDownItemCollection.RemoveAt

Altre risorse

Controllo DomainUpDown (Windows Form)