Click here to Skip to main content
15,897,187 members
Home / Discussions / C#
   

C#

 
AnswerRe: RegEx Question Pin
User 665824-Dec-08 4:57
User 665824-Dec-08 4:57 
GeneralRe: RegEx Question Pin
Muammar©24-Dec-08 5:06
Muammar©24-Dec-08 5:06 
GeneralRe: RegEx Question Pin
User 665824-Dec-08 5:12
User 665824-Dec-08 5:12 
GeneralRe: RegEx Question Pin
Muammar©24-Dec-08 5:26
Muammar©24-Dec-08 5:26 
GeneralRe: RegEx Question Pin
Muammar©26-Dec-08 18:52
Muammar©26-Dec-08 18:52 
AnswerRe: RegEx Question Pin
Gideon Engelberth24-Dec-08 5:00
Gideon Engelberth24-Dec-08 5:00 
GeneralRe: RegEx Question Pin
Muammar©24-Dec-08 5:39
Muammar©24-Dec-08 5:39 
Questionis there a way to convert this snippit to read a string value? Pin
Rafone24-Dec-08 4:31
Rafone24-Dec-08 4:31 
Ho ho ho fellow coders....

is there a way to convert the following recursion code to read this string value??

String Value = "Section1:Section2\\Section3\\Section4\\Section5\\Section6\\Section7\\Section8\\Section9\\etc";

Sample recursion code =

private void btnFillTree_Click(object sender, EventArgs e)
{
directoryTreeView.Nodes.Clear();

String path = "c:\\Temp";

directoryTreeView.Nodes.Add( path );
PopulateTreeView(path, directoryTreeView.Nodes[ 0 ] );
}

public void PopulateTreeView(string directoryValue, TreeNode parentNode )
{
string[] directoryArray =
Directory.GetDirectories( directoryValue );

try
{
if ( directoryArray.Length != 0 )
{
foreach ( string directory in directoryArray )
{
substringDirectory = directory.Substring(
directory.LastIndexOf( '\\' ) + 1,
directory.Length - directory.LastIndexOf( '\\' ) - 1 );

TreeNode myNode = new TreeNode( substringDirectory );

parentNode.Nodes.Add( myNode );

PopulateTreeView( directory, myNode );
}
}
} catch ( UnauthorizedAccessException ) {
parentNode.Nodes.Add( "Access denied" );
} // end catch
}


thanks in advance for any information

rafone

Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
AnswerRe: is there a way to convert this snippit to read a string value? Pin
User 665824-Dec-08 4:38
User 665824-Dec-08 4:38 
GeneralRe: is there a way to convert this snippit to read a string value? Pin
Rafone24-Dec-08 5:10
Rafone24-Dec-08 5:10 
GeneralRe: is there a way to convert this snippit to read a string value? Pin
User 665824-Dec-08 5:15
User 665824-Dec-08 5:15 
GeneralRe: is there a way to convert this snippit to read a string value? Pin
Rafone24-Dec-08 5:21
Rafone24-Dec-08 5:21 
GeneralRe: is there a way to convert this snippit to read a string value? Pin
User 665824-Dec-08 5:41
User 665824-Dec-08 5:41 
GeneralRe: is there a way to convert this snippit to read a string value? [modified] Pin
Rafone24-Dec-08 6:30
Rafone24-Dec-08 6:30 
GeneralRe: is there a way to convert this snippit to read a string value? Pin
User 665824-Dec-08 7:22
User 665824-Dec-08 7:22 
Questionhow to share desktop and control mouse and keyboard? Pin
spiritboy24-Dec-08 4:14
spiritboy24-Dec-08 4:14 
AnswerRe: how to share desktop and control mouse and keyboard? Pin
EliottA24-Dec-08 6:22
EliottA24-Dec-08 6:22 
GeneralRe: how to share desktop and control mouse and keyboard? Pin
spiritboy24-Dec-08 9:11
spiritboy24-Dec-08 9:11 
GeneralRe: how to share desktop and control mouse and keyboard? Pin
EliottA24-Dec-08 12:51
EliottA24-Dec-08 12:51 
Questionwhile loop updates form on Vista, not on XP Pin
ClarkBohs24-Dec-08 4:00
ClarkBohs24-Dec-08 4:00 
AnswerRe: while loop updates form on Vista, not on XP Pin
#realJSOP24-Dec-08 4:05
professional#realJSOP24-Dec-08 4:05 
GeneralRe: while loop updates form on Vista, not on XP Pin
ClarkBohs24-Dec-08 4:35
ClarkBohs24-Dec-08 4:35 
AnswerRe: while loop updates form on Vista, not on XP Pin
User 665824-Dec-08 4:19
User 665824-Dec-08 4:19 
GeneralRe: while loop updates form on Vista, not on XP Pin
ClarkBohs24-Dec-08 4:36
ClarkBohs24-Dec-08 4:36 
GeneralRe: while loop updates form on Vista, not on XP Pin
ClarkBohs24-Dec-08 4:53
ClarkBohs24-Dec-08 4:53 

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.