Condividi tramite


Procedura: rimuovere elementi dai controlli DomainUpDown Windows Form

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

Per rimuovere un elemento

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

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

    -oppure-

  • Utilizzare il RemoveAt metodo per rimuovere un elemento in base alla relativa 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);  
    

Vedi anche