Click here to Skip to main content
15,923,222 members
Home / Discussions / C#
   

C#

 
AnswerRe: USB driver communication in C# 2.0 Pin
Christian Graus8-Dec-05 12:04
protectorChristian Graus8-Dec-05 12:04 
GeneralRe: USB driver communication in C# 2.0 Pin
denpsia8-Dec-05 18:39
denpsia8-Dec-05 18:39 
GeneralRe: USB driver communication in C# 2.0 Pin
Christian Graus8-Dec-05 19:10
protectorChristian Graus8-Dec-05 19:10 
GeneralRe: USB driver communication in C# 2.0 Pin
denpsia8-Dec-05 19:58
denpsia8-Dec-05 19:58 
GeneralRe: USB driver communication in C# 2.0 Pin
bouli8-Dec-05 20:16
bouli8-Dec-05 20:16 
GeneralRe: USB driver communication in C# 2.0 Pin
Dan Neely9-Dec-05 3:02
Dan Neely9-Dec-05 3:02 
Questionflicker on TableLayoutPanel Pin
savage_8-Dec-05 11:09
savage_8-Dec-05 11:09 
QuestionTernary Condition, compiler error. Pin
eggsovereasy8-Dec-05 10:52
eggsovereasy8-Dec-05 10:52 
When I try to compile my class I get this error:

Type of conditional expression can't be determined because there is no implicit conversion between '<null>' and 'int'

Which would make sense, but I am not trying to put a null in an int, I'm trying to stick null in an object...

parms[0].Value = _categoryID == -1 ? null : _categoryID;

where parms is of type SqlParameter[]

Now, if do:

<br />
parms[0].Value = null;<br />


or

<br />
if( _categoryID == -1 )<br />
{<br />
   parms[0].Value = null;<br />
}<br />
else<br />
{<br />
   parms[0].Value = _categoryID;<br />
}<br />


it compiles and works fine. Now obviously this isn't a game breaker because I can write out every if/else statement longhand. However, I should be able to use a ternary condition, right?
AnswerRe: Ternary Condition, compiler error. Pin
Jon Sagara8-Dec-05 11:29
Jon Sagara8-Dec-05 11:29 
AnswerRe: Ternary Condition, compiler error. Pin
Dave Kreskowiak8-Dec-05 11:38
mveDave Kreskowiak8-Dec-05 11:38 
AnswerRe: Ternary Condition, compiler error. Pin
leppie8-Dec-05 13:17
leppie8-Dec-05 13:17 
AnswerRe: Ternary Condition, compiler error. Pin
eggsovereasy12-Dec-05 10:48
eggsovereasy12-Dec-05 10:48 
Questionproblem with saving a picture as an icon Pin
g0ju8-Dec-05 10:18
g0ju8-Dec-05 10:18 
AnswerRe: problem with saving a picture as an icon Pin
NassosReyzidis9-Dec-05 0:31
NassosReyzidis9-Dec-05 0:31 
QuestionLightweight Collections Pin
OldDog.Net8-Dec-05 8:09
OldDog.Net8-Dec-05 8:09 
AnswerRe: Lightweight Collections Pin
Dave Kreskowiak8-Dec-05 11:18
mveDave Kreskowiak8-Dec-05 11:18 
QuestionAsyncronous WebRequest (race condition) Pin
usernameexists8-Dec-05 7:15
usernameexists8-Dec-05 7:15 
QuestionWriting to webpage from C# Pin
monrobot138-Dec-05 7:12
monrobot138-Dec-05 7:12 
AnswerRe: Writing to webpage from C# Pin
Rob Philpott8-Dec-05 7:58
Rob Philpott8-Dec-05 7:58 
GeneralRe: Writing to webpage from C# Pin
monrobot138-Dec-05 8:50
monrobot138-Dec-05 8:50 
GeneralRe: Writing to webpage from C# Pin
Rob Philpott8-Dec-05 9:13
Rob Philpott8-Dec-05 9:13 
GeneralRe: Writing to webpage from C# Pin
monrobot139-Dec-05 19:47
monrobot139-Dec-05 19:47 
GeneralRe: Writing to webpage from C# Pin
monrobot1310-Dec-05 20:17
monrobot1310-Dec-05 20:17 
GeneralRe: Writing to webpage from C# Pin
monrobot1310-Dec-05 20:46
monrobot1310-Dec-05 20:46 
AnswerRe: Writing to webpage from C# Pin
agileagent8-Dec-05 9:24
agileagent8-Dec-05 9:24 

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.