Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 07:16

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C#]DateTime.Parse ArgumentNullException

Discussion on [C#]DateTime.Parse ArgumentNullException within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
BlackWu's Avatar
 
elite*gold: 4
Join Date: Nov 2008
Posts: 1,189
Received Thanks: 395
[C#]DateTime.Parse ArgumentNullException

Hat sich erledigt.

Danke im Voraus
BlackWu is offline  
Old 06/21/2013, 15:08   #2

 
snow's Avatar
 
elite*gold: 724
Join Date: Mar 2011
Posts: 10,479
Received Thanks: 3,318
expDateNode zu sehen, wäre evtl. ganz praktisch.
Du musst halt in Erfahrung bringen, welchen Typ Value hat.

Kann es sein, dass du .Attributes["value"].Value nutzen musst statt .Value?
snow is offline  
Thanks
1 User
Old 06/21/2013, 15:14   #3
 
BlackWu's Avatar
 
elite*gold: 4
Join Date: Nov 2008
Posts: 1,189
Received Thanks: 395
Quote:
Originally Posted by snow911 View Post
expDateNode zu sehen, wäre evtl. ganz praktisch.
Du musst halt in Erfahrung bringen, welchen Typ Value hat.

Kann es sein, dass du .Attributes["value"].Value nutzen musst statt .Value?
Also, expDateNode sieht so aus:
Code:
XmlNode expDateNode = xmlDoc.SelectSingleNode("/appPreset/License/ExpirationDate");
Okay, ich werds mal versuchen, danke.

Edit: Nope, funktioniert nicht.
BlackWu is offline  
Old 06/21/2013, 15:55   #4
 
elite*gold: 0
Join Date: May 2010
Posts: 793
Received Thanks: 268
Quote:
in System.ArgumentNullException is eine ausname vom type "mscorlib" aufgetreten.
...


an welche stelle im code genau bekommt du die nullref eception (das fenster sagt da nicht viel)?

und wie sieht dein xmldokument aus?

PS: ich würd XDocument anstatt Xmldocument verwenden find ich einfacher.
nkkk is offline  
Thanks
1 User
Old 06/21/2013, 16:14   #5
 
BlackWu's Avatar
 
elite*gold: 4
Join Date: Nov 2008
Posts: 1,189
Received Thanks: 395
Quote:
Originally Posted by nkkk View Post
...


an welche stelle im code genau bekommt du die nullref eception (das fenster sagt da nicht viel)?

und wie sieht dein xmldokument aus?

PS: ich würd XDocument anstatt Xmldocument verwenden find ich einfacher.
Das XML Dokument sieht so aus:


Die Exception wird bei
Code:
DateTime.Parse(expDateNode.Value);
aufgerufen.
BlackWu is offline  
Old 06/21/2013, 18:48   #6
 
elite*gold: 100
Join Date: Aug 2005
Posts: 595
Received Thanks: 208
Splitte es mal in 2 Steps auf.
Einmal wo du die Node in einen String einliest, einmal wo du Parsed und debugg das dann.
dready is offline  
Thanks
1 User
Old 06/21/2013, 19:25   #7
 
elite*gold: 0
Join Date: May 2010
Posts: 793
Received Thanks: 268
versuch mal .InnerText statt .Value
nkkk is offline  
Thanks
1 User
Old 06/21/2013, 19:29   #8
 
BlackWu's Avatar
 
elite*gold: 4
Join Date: Nov 2008
Posts: 1,189
Received Thanks: 395
Quote:
Originally Posted by nkkk View Post
versuch mal .InnerText statt .Value
Danke, das war der Fehler, hab es grade selber gemerkt. .Value returnt je nach Node-Typ verschiedene Werte.

Danke an alle.
BlackWu is offline  
Reply

Tags
hipster in badehosen, spaghetto chabonara


Similar Threads Similar Threads
[Help] Stucked at DateTime.Now
01/13/2012 - CO2 Private Server - 10 Replies
His code should spawn monster in time xx.35 but don't work.way? Thanks for help
datetime and count
09/14/2010 - CO2 Private Server - 2 Replies
okay i was trying to count how long an action took. but it counted how long it took to send the action, but not how long it took. How can i make it count after the action is send. And yea I did put the time after the action, but still doing it. Something I can use to check if action is done? Is for 5165 tanel.
[HELP] Parse error: parse error in C:\wamp\www\co\config.php on line 140
03/14/2010 - CO2 Private Server - 5 Replies
Im getting this error when i try to go to my reg page: Parse error: parse error in C:\wamp\www\co\config.php on line 140 It says that ^ Here is the code: <?php // Configurations $myhost='localhost'; // MySQL database address // :33006 $mypass='test'; // MySQL server login
DateTime Guild War
12/16/2009 - CO2 Private Server - 5 Replies
Alright well in the 5165 source I made a datetime start for guild war. Here's the code. public static void GuildWarTime()// On or Off { if (DateTime.Now.DayOfWeek == DayOfWeek.Wednesday && DateTime.Now.Hour == 2 && DateTime.Now.Minute == 15) { StartWar(); } }
[QUESTion] DateTime Help
07/23/2009 - CO2 Private Server - 6 Replies
Ok im looking at this one datetime im trying to make one but i dont understand this hour part where it says ServerTime.Hour == 8 what time is the 8 lol else if ((World.ServerTime.DayName == "Monday" || World.ServerTime.DayName == "Wednesday") && World.ServerTime.Hour == 8 && World.ServerTime.Minute == 50)



All times are GMT +1. The time now is 07:16.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.