方法: Windows フォームの DomainUpDown コントロールから項目を削除する
DomainUpDown.DomainUpDownItemCollection クラスの Remove または RemoveAt メソッドを呼び出すと、Windows フォーム DomainUpDown コントロールから項目を削除することができます。 Remove メソッドを使用すると、特定の項目が削除されますが、RemoveAt メソッドを使用すると、位置を使用して項目が削除されます。
アイテムを削除するには
項目を名前で削除するには、DomainUpDown.DomainUpDownItemCollection クラスの Remove メソッドを使用します。
DomainUpDown1.Items.Remove("noodles")
domainUpDown1.Items.Remove("noodles");
domainUpDown1->Items->Remove("noodles");
\- または -
項目を位置を使用して削除するには、RemoveAt メソッドを使用します。
' 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);
関連項目
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET Desktop feedback