Click here to Skip to main content
16,005,114 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem instantiating form classes created in other C# project Pin
Jacobus0114-May-09 3:41
Jacobus0114-May-09 3:41 
GeneralRe: Problem instantiating form classes created in other C# project Pin
Henry Minute14-May-09 3:50
Henry Minute14-May-09 3:50 
GeneralRe: Problem instantiating form classes created in other C# project Pin
Jacobus0114-May-09 3:57
Jacobus0114-May-09 3:57 
GeneralRe: Problem instantiating form classes created in other C# project Pin
Henry Minute14-May-09 4:02
Henry Minute14-May-09 4:02 
GeneralRe: Problem instantiating form classes created in other C# project Pin
Jacobus0114-May-09 4:08
Jacobus0114-May-09 4:08 
QuestionHow to enable tollbar in windows taskbar Pin
Radzivil Vladimir14-May-09 2:25
Radzivil Vladimir14-May-09 2:25 
AnswerRe: How to enable tollbar in windows taskbar Pin
Henry Minute14-May-09 3:38
Henry Minute14-May-09 3:38 
QuestionLinq To Xml help Pin
Miroslav8814-May-09 2:00
Miroslav8814-May-09 2:00 
okay i need some help with my Linq to Xml code, i want to check if the new XElement that im about to create has the same XAttribute as an old XElement, if it has the same XAttribute as another XElement then instead of adding a new XElement with same XAttribute i want it to replace the old one.

This is my c# code:

string calendarxml = "C:/Users/Miro/Documents/Visual Studio 2008/Projects/Post-it/Post-it/CalendarXml.xml";
                  XElement doc = XElement.Load(calendarxml);
                  XElement root =
                                    new XElement("CalendarNote",
                                    new XAttribute("Date",
monthCalendar1.SelectionStart.ToString("dddd dd MMMM yyyy")),
                                          textBox1.Text);
                        doc.Add(root);
                        doc.Save(calendarxml);

and the output in my xmlfile looks like this:

<calendar>
   <CalendarNote Date="söndag 17 maj 2009">asdasd</CalendarNote>
   <CalendarNote Date="lördag 16 maj 2009">123123</CalendarNote>
   <CalendarNote Date="söndag 17 maj 2009">asdad</CalendarNote>
   <CalendarNote Date="lördag 16 maj 2009">123123</CalendarNote>
   <CalendarNote Date="söndag 17 maj 2009">asdads</CalendarNote>
</calendar>

i dont want to have three söndag 17 maj 2009 and two lördag 16 maj 2009, i want just one, instead of adding a new one with same attribute i want it to replace the old one.
Questionremoting security/permissioning exception... Pin
devvvy14-May-09 1:55
devvvy14-May-09 1:55 
QuestionHow to Create Crystal Report into Visual Studio 2008 (Windows Form) application? Pin
btough14-May-09 1:41
btough14-May-09 1:41 
QuestionPage indexing in c# Pin
Sajjad Leo14-May-09 1:39
Sajjad Leo14-May-09 1:39 
AnswerRe: Page indexing in c# Pin
musefan14-May-09 2:35
musefan14-May-09 2:35 
Questionnavigation among forms in windows application Pin
Aankur Bbansal14-May-09 1:07
Aankur Bbansal14-May-09 1:07 
AnswerRe: navigation among forms in windows application Pin
Samer Aburabie14-May-09 1:14
Samer Aburabie14-May-09 1:14 
AnswerRe: navigation among forms in windows application Pin
Anubhava Dimri14-May-09 1:35
Anubhava Dimri14-May-09 1:35 
Questionc# BHO Issues Pin
svt gdwl14-May-09 1:05
svt gdwl14-May-09 1:05 
AnswerRe: c# BHO Issues Pin
Dave Kreskowiak14-May-09 4:18
mveDave Kreskowiak14-May-09 4:18 
QuestionSocket Error Pin
mahesvs14-May-09 0:49
mahesvs14-May-09 0:49 
AnswerRe: Socket Error Pin
Rob Philpott14-May-09 0:54
Rob Philpott14-May-09 0:54 
GeneralRe: Socket Error Pin
Neezha15-May-09 3:26
Neezha15-May-09 3:26 
AnswerRe: Socket Error Pin
Programm3r14-May-09 1:08
Programm3r14-May-09 1:08 
QuestionAssembly probing - how to instruct to look under bin folder instead of GAC? Pin
devvvy14-May-09 0:49
devvvy14-May-09 0:49 
AnswerCheck out Pin
Ennis Ray Lynch, Jr.14-May-09 2:45
Ennis Ray Lynch, Jr.14-May-09 2:45 
GeneralRe: Check out Pin
devvvy14-May-09 2:49
devvvy14-May-09 2:49 
GeneralRe: Check out Pin
Ennis Ray Lynch, Jr.14-May-09 2:50
Ennis Ray Lynch, Jr.14-May-09 2:50 

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.