Click here to Skip to main content
16,006,006 members
Home / Discussions / C#
   

C#

 
GeneralRe: Process start-close notifications in C# Pin
Christian Graus31-May-05 15:31
protectorChristian Graus31-May-05 15:31 
Generalmissing some things Pin
Tom Wright31-May-05 12:19
Tom Wright31-May-05 12:19 
GeneralRe: missing some things Pin
Judah Gabriel Himango31-May-05 13:10
sponsorJudah Gabriel Himango31-May-05 13:10 
GeneralHave Problem while invoking a method in C# Web Services Pin
grace_at_canada31-May-05 10:36
grace_at_canada31-May-05 10:36 
GeneralRe: Have Problem while invoking a method in C# Web Services Pin
grace_at_canada31-May-05 10:55
grace_at_canada31-May-05 10:55 
GeneralRe: Have Problem while invoking a method in C# Web Services Pin
grace_at_canada1-Jun-05 3:37
grace_at_canada1-Jun-05 3:37 
GeneralDataRow elements datetime problem Pin
parrot12331-May-05 10:26
parrot12331-May-05 10:26 
GeneralRe: DataRow elements datetime problem Pin
Robert Rohde31-May-05 10:46
Robert Rohde31-May-05 10:46 
Although the field might contain a DateTime the compiler doesn't know that this column is filled with DateTime instances. And even if he knew there could still be some rows where this field is empty. In that case the value would be DbNull.
This means you just have to cast the object value you get to tell the compiler explicitely what he not able to determine. You could do something like this:
if (dataRow[fieldIndex] == DbNull.Value) {
//field is empty - do wahtever you think has to be done
} else {
DateTime date = (DateTime)dataRow[fieldIndex];
string timeAsShortString = date.ToShortTime();
}
GeneralRe: DataRow elements datetime problem Pin
parrot1231-Jun-05 2:12
parrot1231-Jun-05 2:12 
GeneralC# Printable Reports from Access DB Pin
Glenn E. Lanier II31-May-05 10:24
Glenn E. Lanier II31-May-05 10:24 
GeneralRe: C# Printable Reports from Access DB Pin
KaptinKrunch31-May-05 19:04
KaptinKrunch31-May-05 19:04 
GeneralRe: C# Printable Reports from Access DB Pin
Glenn E. Lanier II1-Jun-05 3:01
Glenn E. Lanier II1-Jun-05 3:01 
GeneralRe: C# Printable Reports from Access DB Pin
Anonymous2-Jun-05 6:14
Anonymous2-Jun-05 6:14 
GeneralRe: C# Printable Reports from Access DB Pin
Glenn E. Lanier II2-Jun-05 6:32
Glenn E. Lanier II2-Jun-05 6:32 
GeneralRe: C# Printable Reports from Access DB Pin
KaptinKrunch2-Jun-05 16:14
KaptinKrunch2-Jun-05 16:14 
GeneralRe: C# Printable Reports from Access DB Pin
Glenn E. Lanier II6-Jun-05 6:57
Glenn E. Lanier II6-Jun-05 6:57 
GeneralI'm Totally Stumped - DirectDraw C# Surfaces Pin
YawgmothIII31-May-05 8:59
YawgmothIII31-May-05 8:59 
GeneralRe: I'm Totally Stumped - DirectDraw C# Surfaces Pin
Christian Graus31-May-05 11:53
protectorChristian Graus31-May-05 11:53 
GeneralRe: I'm Totally Stumped - DirectDraw C# Surfaces Pin
Anonymous31-May-05 12:42
Anonymous31-May-05 12:42 
GeneralRe: I'm Totally Stumped - DirectDraw C# Surfaces Pin
Christian Graus31-May-05 12:50
protectorChristian Graus31-May-05 12:50 
GeneralRe: I'm Totally Stumped - DirectDraw C# Surfaces Pin
Anonymous31-May-05 15:04
Anonymous31-May-05 15:04 
GeneralRe: I'm Totally Stumped - DirectDraw C# Surfaces Pin
Christian Graus31-May-05 15:21
protectorChristian Graus31-May-05 15:21 
Generalusing windows' auto complete Pin
Green Fuze31-May-05 8:43
Green Fuze31-May-05 8:43 
GeneralRe: using windows' auto complete Pin
OMalleyW31-May-05 9:00
OMalleyW31-May-05 9:00 
GeneralRe: using windows' auto complete Pin
Green Fuze31-May-05 12:35
Green Fuze31-May-05 12:35 

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.