Click here to Skip to main content
15,892,480 members
Home / Discussions / C#
   

C#

 
AnswerRe: Reading and writing from a List<string> simultaneously Pin
Dave Kreskowiak9-Jul-14 18:50
mveDave Kreskowiak9-Jul-14 18:50 
QuestionAutoUpdater c# wpf xmal Pin
EvilRevenger9-Jul-14 14:29
EvilRevenger9-Jul-14 14:29 
AnswerRe: AutoUpdater c# wpf xmal Pin
Pete O'Hanlon9-Jul-14 20:05
mvePete O'Hanlon9-Jul-14 20:05 
AnswerRe: AutoUpdater c# wpf xmal Pin
GuyThiebaut10-Jul-14 3:29
professionalGuyThiebaut10-Jul-14 3:29 
GeneralRe: AutoUpdater c# wpf xmal Pin
Dave Kreskowiak10-Jul-14 3:45
mveDave Kreskowiak10-Jul-14 3:45 
GeneralRe: AutoUpdater c# wpf xmal Pin
GuyThiebaut10-Jul-14 3:57
professionalGuyThiebaut10-Jul-14 3:57 
GeneralRe: AutoUpdater c# wpf xmal Pin
EvilRevenger10-Jul-14 5:46
EvilRevenger10-Jul-14 5:46 
GeneralRe: AutoUpdater c# wpf xmal Pin
GuyThiebaut10-Jul-14 9:42
professionalGuyThiebaut10-Jul-14 9:42 
GeneralRe: AutoUpdater c# wpf xmal Pin
EvilRevenger10-Jul-14 15:49
EvilRevenger10-Jul-14 15:49 
QuestionUsing a .txt file as input from network folder Pin
CaptainJack6839-Jul-14 11:38
CaptainJack6839-Jul-14 11:38 
AnswerRe: Using a .txt file as input from network folder Pin
Dave Kreskowiak9-Jul-14 12:20
mveDave Kreskowiak9-Jul-14 12:20 
GeneralRe: Using a .txt file as input from network folder Pin
CaptainJack68310-Jul-14 3:32
CaptainJack68310-Jul-14 3:32 
GeneralNeed Extension methods as mentioned below Pin
prasanna_durai9-Jul-14 7:09
prasanna_durai9-Jul-14 7:09 
GeneralRe: Need Extension methods as mentioned below Pin
Matt T Heffron9-Jul-14 7:38
professionalMatt T Heffron9-Jul-14 7:38 
GeneralRe: Need Extension methods as mentioned below Pin
OriginalGriff9-Jul-14 8:11
mveOriginalGriff9-Jul-14 8:11 
QuestionSplit tag xml in more file xml, with C# Pin
Federico Barbieri8-Jul-14 22:50
Federico Barbieri8-Jul-14 22:50 
SuggestionRe: Split tag xml in more file xml, with C# Pin
Richard MacCutchan8-Jul-14 23:20
mveRichard MacCutchan8-Jul-14 23:20 
AnswerRe: Split tag xml in more file xml, with C# Pin
Richard Deeming9-Jul-14 2:05
mveRichard Deeming9-Jul-14 2:05 
Linq to XML[^] makes this fairly simple:

C#
XDocument document = XDocument.Parse(@"<root>
    <Header>
        <B>
            <C></C>
            <D></D>
        </B>
    </Header>
    <Body>
        <F></F>
    </Body>
    <Body>
        <G></G>
    </Body>
    <Body>
        <H></H>
    </Body>
</root>");


XName rootName = document.Root.Name;
XDeclaration declaration = document.Declaration;
XElement header = document.Root.Element("Header");

IEnumerable<XDocument> newDocuments = document.Root.Elements("Body")
    .Select(body => new XDocument(
        declaration,
        new XElement(rootName,
            header,
            body
        )
    ));

foreach (XDocument newDocument in newDocuments)
{
    // Do something with the document:
    Console.WriteLine(newDocument);
}




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


QuestionAdding code to encrypt and decrypt text in textbox with C# 2008 Pin
KaKoten8-Jul-14 21:29
KaKoten8-Jul-14 21:29 
AnswerRe: Adding code to encrypt and decrypt text in textbox with C# 2008 Pin
OriginalGriff8-Jul-14 22:56
mveOriginalGriff8-Jul-14 22:56 
GeneralRe: Adding code to encrypt and decrypt text in textbox with C# 2008 Pin
KaKoten9-Jul-14 13:15
KaKoten9-Jul-14 13:15 
GeneralRe: Adding code to encrypt and decrypt text in textbox with C# 2008 Pin
OriginalGriff9-Jul-14 21:31
mveOriginalGriff9-Jul-14 21:31 
GeneralRe: Adding code to encrypt and decrypt text in textbox with C# 2008 Pin
KaKoten9-Jul-14 23:17
KaKoten9-Jul-14 23:17 
AnswerRe: Adding code to encrypt and decrypt text in textbox with C# 2008 Pin
Eddy Vluggen11-Jul-14 7:19
professionalEddy Vluggen11-Jul-14 7:19 
QuestionC# Questions Pin
shiftwik8-Jul-14 8:32
shiftwik8-Jul-14 8:32 

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.