Click here to Skip to main content
15,903,724 members
Home / Discussions / C#
   

C#

 
GeneralRe: XML usage Pin
eblaschka10-Aug-14 11:39
eblaschka10-Aug-14 11:39 
GeneralRe: XML usage Pin
Richard Deeming11-Aug-14 1:53
mveRichard Deeming11-Aug-14 1:53 
GeneralRe: XML usage Pin
eblaschka12-Aug-14 4:42
eblaschka12-Aug-14 4:42 
GeneralRe: XML usage Pin
eblaschka12-Aug-14 11:14
eblaschka12-Aug-14 11:14 
AnswerThank you! Pin
eblaschka7-Aug-14 13:03
eblaschka7-Aug-14 13:03 
GeneralRe: Thank you! Pin
Dave Kreskowiak7-Aug-14 16:51
mveDave Kreskowiak7-Aug-14 16:51 
AnswerThank you! Pin
eblaschka7-Aug-14 15:49
eblaschka7-Aug-14 15:49 
GeneralRe: Thank you! Pin
Richard Deeming8-Aug-14 2:09
mveRichard Deeming8-Aug-14 2:09 
If you reply to someone's message, then they get notified that you've replied. If you reply to yourself, then nobody else will be notified. D'Oh! | :doh:

There's almost certainly a way to make it work, but without knowing the full structure of your XML file, we can only guess:
C#
static string GetFullPath(XElement fileElement)
{
    var names = new HashSet<XName> { "Drive", "Folder", "File" };

    IEnumerable<string> pathParts = fileElements.AncestorsAndSelf()
        .TakeWhile(el => el.Name != "Drives") // Stop when you reach the <Drives> node
        .Where(el => names.Contains(el.Name))
        .Select(el => (string)el.Element("Name"))
        .Reverse();

    return string.Join("\\", pathParts);
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


AnswerRe: XML usage Pin
PIEBALDconsult7-Aug-14 16:43
mvePIEBALDconsult7-Aug-14 16:43 
QuestionSend Email Notifications from Server Pin
Jassim Rahma6-Aug-14 11:28
Jassim Rahma6-Aug-14 11:28 
AnswerRe: Send Email Notifications from Server Pin
Bernhard Hiller6-Aug-14 20:54
Bernhard Hiller6-Aug-14 20:54 
GeneralRe: Send Email Notifications from Server Pin
Jassim Rahma10-Aug-14 10:19
Jassim Rahma10-Aug-14 10:19 
GeneralRe: Send Email Notifications from Server Pin
Bernhard Hiller10-Aug-14 20:06
Bernhard Hiller10-Aug-14 20:06 
Question.net framework Pin
Member 109952356-Aug-14 1:07
Member 109952356-Aug-14 1:07 
AnswerRe: .net framework PinPopular
Pete O'Hanlon6-Aug-14 1:09
mvePete O'Hanlon6-Aug-14 1:09 
GeneralRe: .net framework Pin
Joe Woodbury6-Aug-14 14:00
professionalJoe Woodbury6-Aug-14 14:00 
AnswerRe: .net framework Pin
Akhil Mittal6-Aug-14 20:07
professionalAkhil Mittal6-Aug-14 20:07 
QuestionAfter Call Through WebAPI, Entity Is Null Pin
Kevin Marois5-Aug-14 8:14
professionalKevin Marois5-Aug-14 8:14 
QuestionRe: After Call Through WebAPI, Entity Is Null Pin
Richard Deeming5-Aug-14 8:48
mveRichard Deeming5-Aug-14 8:48 
AnswerRe: After Call Through WebAPI, Entity Is Null Pin
Kevin Marois5-Aug-14 12:40
professionalKevin Marois5-Aug-14 12:40 
QuestionRe: After Call Through WebAPI, Entity Is Null Pin
Richard Deeming6-Aug-14 1:33
mveRichard Deeming6-Aug-14 1:33 
Questioni don't know at what is zed using in this code the ''if(mode == 'c')",pls help! Pin
Alex Sturza5-Aug-14 5:41
Alex Sturza5-Aug-14 5:41 
AnswerRe: i don't know at what is zed using in this code the ''if(mode == 'c')",pls help! Pin
Dilan Shaminda5-Aug-14 5:49
professionalDilan Shaminda5-Aug-14 5:49 
GeneralRe: i don't know at what is zed using in this code the ''if(mode == 'c')",pls help! Pin
Alex Sturza5-Aug-14 6:17
Alex Sturza5-Aug-14 6:17 
GeneralRe: i don't know at what is zed using in this code the ''if(mode == 'c')",pls help! Pin
Dilan Shaminda5-Aug-14 6:34
professionalDilan Shaminda5-Aug-14 6:34 

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.