Click here to Skip to main content
15,893,486 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to get Digital ProductID from registry remotely: using StdRegProv Pin
Ron Beyer20-Dec-13 18:22
professionalRon Beyer20-Dec-13 18:22 
GeneralRe: How to get Digital ProductID from registry remotely: using StdRegProv Pin
sigma_ivan22-Dec-13 22:27
sigma_ivan22-Dec-13 22:27 
Questionhow to create column in crystal report at dynamically Pin
An@nd Rajan1019-Dec-13 23:48
professionalAn@nd Rajan1019-Dec-13 23:48 
AnswerRe: how to create column in crystal report at dynamically Pin
jschell20-Dec-13 9:21
jschell20-Dec-13 9:21 
GeneralRe: how to create column in crystal report at dynamically Pin
An@nd Rajan1020-Dec-13 18:13
professionalAn@nd Rajan1020-Dec-13 18:13 
QuestionHow to copy the Facebook photo arrangement functionality to local computer? Pin
biop.codeproject19-Dec-13 17:46
biop.codeproject19-Dec-13 17:46 
AnswerRe: How to copy the Facebook photo arrangement functionality to local computer? Pin
Mycroft Holmes19-Dec-13 19:01
professionalMycroft Holmes19-Dec-13 19:01 
Questionask messagebox with sum record Pin
Member 1027082519-Dec-13 16:58
Member 1027082519-Dec-13 16:58 
AnswerRe: ask messagebox with sum record Pin
Mycroft Holmes19-Dec-13 18:57
professionalMycroft Holmes19-Dec-13 18:57 
GeneralRe: ask messagebox with sum record Pin
Member 1027082519-Dec-13 19:41
Member 1027082519-Dec-13 19:41 
GeneralRe: ask messagebox with sum record Pin
Mycroft Holmes19-Dec-13 23:46
professionalMycroft Holmes19-Dec-13 23:46 
GeneralRe: ask messagebox with sum record Pin
Simon_Whale20-Dec-13 0:29
Simon_Whale20-Dec-13 0:29 
SuggestionRe: ask messagebox with sum record Pin
Richard Deeming20-Dec-13 2:03
mveRichard Deeming20-Dec-13 2:03 
QuestionThis operation would create an incorrectly structured document. Pin
Jassim Rahma19-Dec-13 10:10
Jassim Rahma19-Dec-13 10:10 
AnswerRe: This operation would create an incorrectly structured document. Pin
Ravi Bhavnani19-Dec-13 10:49
professionalRavi Bhavnani19-Dec-13 10:49 
GeneralRe: This operation would create an incorrectly structured document. Pin
Manfred Rudolf Bihy19-Dec-13 12:22
professionalManfred Rudolf Bihy19-Dec-13 12:22 
GeneralRe: This operation would create an incorrectly structured document. Pin
Jassim Rahma19-Dec-13 22:13
Jassim Rahma19-Dec-13 22:13 
GeneralRe: This operation would create an incorrectly structured document. Pin
JV999919-Dec-13 22:58
professionalJV999919-Dec-13 22:58 
GeneralRe: This operation would create an incorrectly structured document. Pin
Richard Deeming20-Dec-13 1:55
mveRichard Deeming20-Dec-13 1:55 
AnswerRe: This operation would create an incorrectly structured document. Pin
Ravi Bhavnani20-Dec-13 2:10
professionalRavi Bhavnani20-Dec-13 2:10 
AnswerRe: This operation would create an incorrectly structured document. Pin
Ravi Bhavnani20-Dec-13 2:10
professionalRavi Bhavnani20-Dec-13 2:10 
Try this:
xml_document = new XDocument();
xml_document.Declaration = new XDeclaration("1.0", "utf-8", "true");
XElement rootEle = new XElement("EventLog")
xml_document.Add(rootEle);

XElement event_node = new XElement("Event", new XAttribute("ID", Guid.NewGuid().ToString()));
XElement event_date = new XElement("DateTime", DateTime.UtcNow.ToString("ddd dd MMM yyyy HH:mm:ss"));
XElement event_details = new XElement("Description", event_description);
event_node.Add(event_date);
event_node.Add(event_details);
 
// Append element to root
rootEle.Add(event_node);
 
xml_document.Save("eventlog.xml");

/ravi
My new year resolution: 2048 x 1536
Home | Articles | My .NET bits | Freeware
ravib(at)ravib(dot)com

GeneralRe: This operation would create an incorrectly structured document. Pin
Jassim Rahma20-Dec-13 2:15
Jassim Rahma20-Dec-13 2:15 
Questiondetermine if Google Drive is installed and what's its drive? Pin
Jassim Rahma19-Dec-13 7:28
Jassim Rahma19-Dec-13 7:28 
AnswerRe: determine if Google Drive is installed and what's its drive? Pin
Eddy Vluggen19-Dec-13 7:52
professionalEddy Vluggen19-Dec-13 7:52 
AnswerRe: determine if Google Drive is installed and what's its drive? Pin
BillWoodruff19-Dec-13 8:40
professionalBillWoodruff19-Dec-13 8:40 

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.