Click here to Skip to main content
15,888,984 members
Home / Discussions / C#
   

C#

 
AnswerRe: What's your suggest ? Pin
Wendelius16-Jan-09 6:44
mentorWendelius16-Jan-09 6:44 
GeneralRe: What's your suggest ? Pin
Mohammad Dayyan16-Jan-09 6:53
Mohammad Dayyan16-Jan-09 6:53 
GeneralRe: What's your suggest ? Pin
Wendelius16-Jan-09 7:00
mentorWendelius16-Jan-09 7:00 
QuestionComboBox in a Datagrid Pin
indian14316-Jan-09 3:38
indian14316-Jan-09 3:38 
AnswerRe: ComboBox in a Datagrid Pin
Henry Minute16-Jan-09 4:26
Henry Minute16-Jan-09 4:26 
AnswerRe: ComboBox in a Datagrid Pin
Jim (SS)16-Jan-09 5:34
Jim (SS)16-Jan-09 5:34 
QuestionFull trust network share problem during unit testing vs2008 on vista x64 (caspol solution does not work). Pin
Dennis Dam16-Jan-09 2:53
Dennis Dam16-Jan-09 2:53 
QuestionRetrieve Filenames Distinctively Pin
Vimalsoft(Pty) Ltd16-Jan-09 2:21
professionalVimalsoft(Pty) Ltd16-Jan-09 2:21 
Good Afternoon All

i have the Following code that retrieve the file names from the Certain Directory and bind it to the Dropdownlist. like this



DirectoryInfo dir = new DirectoryInfo(@"C:\DATABASES\");

FileInfo[] files = dir.GetFiles();

foreach (FileInfo file in files)
{
    cmbrestore.Items.Add(Convert.ToString(file));
}


The code is working, but now if there is a File with same name , it will display them all.

How can i make sure that it will show the File names Distinctively ?
How can i exclude certain File extension from being displayed from the Dropdownlist ?

Thank you

Vuyiswa Maseko,

Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za


AnswerRe: Retrieve Filenames Distinctively Pin
Pete O'Hanlon16-Jan-09 2:38
mvePete O'Hanlon16-Jan-09 2:38 
GeneralRe: Retrieve Filenames Distinctively Pin
Vimalsoft(Pty) Ltd16-Jan-09 3:11
professionalVimalsoft(Pty) Ltd16-Jan-09 3:11 
GeneralRe: Retrieve Filenames Distinctively Pin
Pete O'Hanlon16-Jan-09 3:59
mvePete O'Hanlon16-Jan-09 3:59 
GeneralRe: Retrieve Filenames Distinctively Pin
#realJSOP16-Jan-09 5:35
mve#realJSOP16-Jan-09 5:35 
AnswerRe: Retrieve Filenames Distinctively [modified] Pin
Luc Pattyn16-Jan-09 6:56
sitebuilderLuc Pattyn16-Jan-09 6:56 
AnswerRe: Retrieve Filenames Distinctively Pin
Ashfield16-Jan-09 2:42
Ashfield16-Jan-09 2:42 
AnswerRe: Retrieve Filenames Distinctively Pin
User 665816-Jan-09 2:51
User 665816-Jan-09 2:51 
AnswerRe: Retrieve Filenames Distinctively Pin
Vikram A Punathambekar16-Jan-09 3:15
Vikram A Punathambekar16-Jan-09 3:15 
GeneralRe: Retrieve Filenames Distinctively Pin
User 665816-Jan-09 3:28
User 665816-Jan-09 3:28 
GeneralRe: Retrieve Filenames Distinctively Pin
Vikram A Punathambekar16-Jan-09 4:03
Vikram A Punathambekar16-Jan-09 4:03 
AnswerRe: Retrieve Filenames Distinctively [modified] Pin
Luc Pattyn16-Jan-09 4:40
sitebuilderLuc Pattyn16-Jan-09 4:40 
GeneralRe: Retrieve Filenames Distinctively Pin
Vikram A Punathambekar16-Jan-09 4:43
Vikram A Punathambekar16-Jan-09 4:43 
GeneralRe: Retrieve Filenames Distinctively Pin
S. Senthil Kumar16-Jan-09 7:30
S. Senthil Kumar16-Jan-09 7:30 
AnswerRe: Retrieve Filenames Distinctively [modified] Pin
Luc Pattyn16-Jan-09 8:00
sitebuilderLuc Pattyn16-Jan-09 8:00 
GeneralRe: Retrieve Filenames Distinctively Pin
Giorgi Dalakishvili16-Jan-09 9:56
mentorGiorgi Dalakishvili16-Jan-09 9:56 
GeneralRe: Retrieve Filenames Distinctively Pin
Vimalsoft(Pty) Ltd16-Jan-09 3:28
professionalVimalsoft(Pty) Ltd16-Jan-09 3:28 
GeneralRe: Retrieve Filenames Distinctively Pin
Eddy Vluggen16-Jan-09 4:01
professionalEddy Vluggen16-Jan-09 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.