Click here to Skip to main content
15,896,726 members
Home / Discussions / C#
   

C#

 
AnswerRe: Multi Monitor Application Pin
mav.northwind10-Nov-06 20:44
mav.northwind10-Nov-06 20:44 
QuestionIs there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 0:46
Support1239-Nov-06 0:46 
AnswerRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
rah_sin9-Nov-06 0:54
professionalrah_sin9-Nov-06 0:54 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 1:03
Support1239-Nov-06 1:03 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
rah_sin9-Nov-06 1:33
professionalrah_sin9-Nov-06 1:33 
AnswerRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Colin Angus Mackay9-Nov-06 1:00
Colin Angus Mackay9-Nov-06 1:00 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 1:09
Support1239-Nov-06 1:09 
AnswerRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Hunuman9-Nov-06 1:29
Hunuman9-Nov-06 1:29 
I suggest that instead of using Convert, use DateTime.Parse.

See Example from MSDN below:

using System;
using System.Globalization;

namespace Parse
{
class Class1
{
public static void Main(string[] args)
{
// Assume the current culture is en-US.
// The date is Feburary 16, 1992, 12 hours, 15 minutes and 12 seconds.

string myDateTimeValue = "2/16/1992 12:15:12";
DateTime myDateTime = DateTime.Parse(myDateTimeValue);
Console.WriteLine("1) myDateTime = {0}", myDateTime);

// Reverse month and day to conform to a different culture.
// The date is Feburary 16, 1992, 12 hours, 15 minutes and 12 seconds.

IFormatProvider culture = new CultureInfo("fr-FR", true);
string myDateTimeFrenchValue = " 16/02/1992 12:15:12";
DateTime myDateTimeFrench =
DateTime.Parse(myDateTimeFrenchValue,
culture,
DateTimeStyles.NoCurrentDateDefault);
Console.WriteLine("2) myDateTimeFrench = {0}", myDateTimeFrench);

// The date is Feburary 16, 1992, 12 hours, 15 minutes and 12 seconds.

string[] expectedFormats = {"G", "g", "f" ,"F"};
myDateTimeFrench =
DateTime.ParseExact(myDateTimeFrenchValue,
expectedFormats,
culture,
DateTimeStyles.AllowWhiteSpaces);
Console.WriteLine("3) myDateTimeFrench = {0}", myDateTimeFrench);
}
}
}
/*
This example yields the following results:

1) myDateTime = 2/16/1992 12:15:12 PM
2) myDateTimeFrench = 2/16/1992 12:15:12 PM
3) myDateTimeFrench = 2/16/1992 12:15:12 PM
*/



if (ToErr == Human.Nature)
{
Forgive = Divine;
}
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 1:44
Support1239-Nov-06 1:44 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Colin Angus Mackay9-Nov-06 6:59
Colin Angus Mackay9-Nov-06 6:59 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Pete O'Hanlon9-Nov-06 1:45
mvePete O'Hanlon9-Nov-06 1:45 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 2:12
Support1239-Nov-06 2:12 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Pete O'Hanlon9-Nov-06 2:27
mvePete O'Hanlon9-Nov-06 2:27 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 2:32
Support1239-Nov-06 2:32 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Pete O'Hanlon9-Nov-06 4:14
mvePete O'Hanlon9-Nov-06 4:14 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 5:27
Support1239-Nov-06 5:27 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Pete O'Hanlon9-Nov-06 9:11
mvePete O'Hanlon9-Nov-06 9:11 
QuestionTo make possible to manage position and size of controls by mouse Pin
wasek20018-Nov-06 23:59
wasek20018-Nov-06 23:59 
AnswerRe: To make possible to manage position and size of controls by mouse Pin
mark_w_9-Nov-06 0:27
mark_w_9-Nov-06 0:27 
QuestionRe: To make possible to manage position and size of controls by mouse Pin
wasek20019-Nov-06 4:31
wasek20019-Nov-06 4:31 
QuestionAbstract collection in property grid Pin
mark_w_8-Nov-06 23:56
mark_w_8-Nov-06 23:56 
AnswerRe: Abstract collection in property grid Pin
Robert Rohde9-Nov-06 0:52
Robert Rohde9-Nov-06 0:52 
AnswerRe: Abstract collection in property grid Pin
mark_w_9-Nov-06 1:27
mark_w_9-Nov-06 1:27 
QuestionWrapping or creating custom XML elements Pin
TUX2K8-Nov-06 23:39
TUX2K8-Nov-06 23:39 
QuestionLike "VS Watch" control Pin
El'Cachubrey8-Nov-06 23:38
El'Cachubrey8-Nov-06 23:38 

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.