Private Sub RedirectCAE_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load CAE_ComboBox.Items.Clear() CAE_ComboBox.Text = Nothing Dim myfolder As DirectoryInfo = New DirectoryInfo("\\mcusquanfs01\NRFZHD\RDM_NRFK_WN7\SynergyLite\CAE_Server") Dim strFiles() As FileInfo = myfolder.GetFiles("*.txt") For Each myItem As FileInfo In strFiles CAE_ComboBox.Items.Add(myItem) Next End Sub
strFiles.ToList().ForEach(i => CAE_ComboBox.Items.Add(Path.GetFileNameWithoutExtension(i.Name)));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)