Click here to Skip to main content
15,884,473 members
Home / Discussions / C#
   

C#

 
QuestionDetermining valid moves for a chess game Pin
Gareth H28-Jul-08 3:00
Gareth H28-Jul-08 3:00 
AnswerRe: Determining valid moves for a chess game Pin
enginço28-Jul-08 3:21
enginço28-Jul-08 3:21 
GeneralRe: Determining valid moves for a chess game Pin
Gareth H28-Jul-08 3:31
Gareth H28-Jul-08 3:31 
AnswerRe: Determining valid moves for a chess game [modified] PinPopular
Luc Pattyn28-Jul-08 4:00
sitebuilderLuc Pattyn28-Jul-08 4:00 
AnswerRe: Determining valid moves for a chess game Pin
GuyThiebaut28-Jul-08 5:11
professionalGuyThiebaut28-Jul-08 5:11 
GeneralRe: Determining valid moves for a chess game Pin
Luc Pattyn28-Jul-08 5:25
sitebuilderLuc Pattyn28-Jul-08 5:25 
GeneralRe: Determining valid moves for a chess game Pin
GuyThiebaut28-Jul-08 5:43
professionalGuyThiebaut28-Jul-08 5:43 
QuestionType comparison syntax Pin
Mycroft Holmes28-Jul-08 2:58
professionalMycroft Holmes28-Jul-08 2:58 
I have a variable passed into a method as an object. The object type is SQLDBType, I need to test the variable to find out what type it is, not the SQLDBType but the underlying eg varchar datetime (specifically I want to test wether the variable id datetime. Can someone please supply the syntax to find out if the dbtype is datetime

I am currently using the string comparison to "DateTime". However I then want to test the value of the datetime content (checking for #12:00:00# = no date) and falling in a hole.

public SQLParameter CreateParameter(string sParameterName, SqlDbType oDataType,
    object oValue, int iLenght, ParameterDirection oDirection)
{
    SQLParameter oParam = new SQLParameter();
    oParam.ParameterName = sParameterName;
    oParam.Length = iLenght;
    if (oDataType.ToString() == "DateTime") //Testing against a string, how bloody awful
    {
        if (oValue == DBNull.Value)
        { oParam.Value = oValue; }
        else
        {
            oDT = DateTime.Parse(oValue.ToString);//Fails to compile I want to test the value


Never underestimate the power of human stupidity
RAH

AnswerRe: Type comparison syntax Pin
Gareth H28-Jul-08 3:03
Gareth H28-Jul-08 3:03 
GeneralRe: Type comparison syntax Pin
Mycroft Holmes28-Jul-08 4:13
professionalMycroft Holmes28-Jul-08 4:13 
QuestionScrapping a Datastore Pin
logicon28-Jul-08 2:54
logicon28-Jul-08 2:54 
AnswerRe: Scrapping a Datastore Pin
logicon28-Jul-08 3:26
logicon28-Jul-08 3:26 
Questionold value after validating event of datetimepicker Pin
tabstop28-Jul-08 2:25
tabstop28-Jul-08 2:25 
AnswerRe: old value after validating event of datetimepicker Pin
Kjetil Svendsen28-Jul-08 5:30
Kjetil Svendsen28-Jul-08 5:30 
GeneralRe: old value after validating event of datetimepicker Pin
tabstop28-Jul-08 20:49
tabstop28-Jul-08 20:49 
Questionupdate xml file Pin
arkiboys28-Jul-08 2:14
arkiboys28-Jul-08 2:14 
AnswerRe: update xml file Pin
teejayem28-Jul-08 2:39
teejayem28-Jul-08 2:39 
QuestionDeploying multiple projects Pin
jamesjk28-Jul-08 1:04
jamesjk28-Jul-08 1:04 
AnswerRe: Deploying multiple projects Pin
Thomas Stockwell28-Jul-08 1:33
professionalThomas Stockwell28-Jul-08 1:33 
GeneralRe: Deploying multiple projects Pin
jamesjk28-Jul-08 1:54
jamesjk28-Jul-08 1:54 
GeneralRe: Deploying multiple projects Pin
Thomas Stockwell28-Jul-08 2:03
professionalThomas Stockwell28-Jul-08 2:03 
QuestionopenFileDialog win form Pin
arkiboys28-Jul-08 0:59
arkiboys28-Jul-08 0:59 
AnswerRe: openFileDialog win form Pin
stancrm28-Jul-08 1:05
stancrm28-Jul-08 1:05 
GeneralRe: openFileDialog win form Pin
arkiboys28-Jul-08 1:17
arkiboys28-Jul-08 1:17 
GeneralRe: openFileDialog win form Pin
sumit703428-Jul-08 1:33
sumit703428-Jul-08 1:33 

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.