title: How to Convert Double and DateTime Correctly accordingly to Current Culture?
body: <p>Hi in my excel like application i want to convert many values and validate it. But while converting double and dateTime i facing some serious issues. The below code snippet is working well for English Culture. But when the culture is German i get the text as 24.3.2014. Now it is converted into double and returns a double value but i don't want it to be converted to double. Any suggestion on it.?</p>
  
  <pre><code>string Text= "24.03.2014";
  CultureInfo ci = CultureInfo.CreateSpecificCulture("de-DE");
  var numberformat = ci.NumberFormat;
  double d;
  DateTime date;
  if (double.TryParse(Text, NumberStyles.Any, numberformat, out d))
  {
      Console.WriteLine(d); //prints 24032014.0
  }
  else if (DateTime.TryParse(Text, numberformat, DateTimeStyles.None, out date))
  {
      Console.WriteLine(date);
  }
  </code></pre>