Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi to all..

actually i have some folder structure in 'D' like this sample folder
|_hello folder----|_hi.txt
|_file.txt |_bye.txt
but now we have display as entire folder structure as string and then we can deseralize it..
if any body knows pls let me know....
Posted

1 solution

It might be helpful,

C#
public string GetDirectories()
{
    string result = string.Empty;
    string seperator = ";";
    Array.ForEach(Directory.GetDirectories("D:\\").ToArray(), item => { result = string.Concat(result, item, seperator); });
    return result;
}


:)
 
Share this answer
 
v3
Comments
komalilella 4-Aug-11 5:35am    
it not getting..pls let me know..
when ever i clik the button that time that entire string will display in textbox.
Mohammad A Rahman 4-Aug-11 5:43am    
From the Button click event handler call GetDirectires method and use return of the method text for TextBox. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900