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

C#

 
Questionstatic page user logon active directory Pin
mushy22-Feb-07 19:51
mushy22-Feb-07 19:51 
QuestionError! Pin
hiremath7122-Feb-07 19:46
hiremath7122-Feb-07 19:46 
AnswerRe: Error! Pin
__DanC__22-Feb-07 20:45
__DanC__22-Feb-07 20:45 
QuestionMINIMIZE TO MAXIMIZE Pin
M Riaz Bashir22-Feb-07 19:29
M Riaz Bashir22-Feb-07 19:29 
AnswerRe: MINIMIZE TO MAXIMIZE Pin
Stefan Troschuetz22-Feb-07 22:08
Stefan Troschuetz22-Feb-07 22:08 
GeneralRe: MINIMIZE TO MAXIMIZE Pin
M Riaz Bashir22-Feb-07 22:18
M Riaz Bashir22-Feb-07 22:18 
GeneralRe: MINIMIZE TO MAXIMIZE Pin
Stefan Troschuetz22-Feb-07 22:24
Stefan Troschuetz22-Feb-07 22:24 
QuestionConditional Operator in C# Pin
AesopTurtle22-Feb-07 19:21
AesopTurtle22-Feb-07 19:21 
Hi,

I'm trying to use the Conditional Operator in C# in the form of

<bool condition> ? <true value> : <false value>;

and I want the value to return as NULL if the condition is false.
For example:

bool _validated = _boolText != null? bool.Parse(_boolText): null;

But an error occurs when trying to build.
Here is the error message:

Type of conditional expression cannot be determined because there is no implicit conversion between 'bool' and '<null>'

How can I solve this problem?


Thank you very much.






KiT

-- Never wait for a chance to come, Believe in your own potential and go get it! --

AnswerRe: Conditional Operator in C# [modified] Pin
Tuwing.Sabado22-Feb-07 19:32
Tuwing.Sabado22-Feb-07 19:32 
GeneralRe: Conditional Operator in C# Pin
Harini N K22-Feb-07 19:41
Harini N K22-Feb-07 19:41 
GeneralRe: Conditional Operator in C# Pin
Tuwing.Sabado22-Feb-07 19:49
Tuwing.Sabado22-Feb-07 19:49 
GeneralRe: Conditional Operator in C# [modified] Pin
AesopTurtle22-Feb-07 19:52
AesopTurtle22-Feb-07 19:52 
GeneralRe: Conditional Operator in C# Pin
Tuwing.Sabado22-Feb-07 21:00
Tuwing.Sabado22-Feb-07 21:00 
GeneralRe: Conditional Operator in C# Pin
AesopTurtle22-Feb-07 21:21
AesopTurtle22-Feb-07 21:21 
GeneralRe: Conditional Operator in C# Pin
Harini N K22-Feb-07 21:21
Harini N K22-Feb-07 21:21 
QuestionHelp regarding Webbrowser control Pin
anu8122-Feb-07 19:16
anu8122-Feb-07 19:16 
AnswerRe: Help regarding Webbrowser control Pin
il_masacratore22-Feb-07 21:30
il_masacratore22-Feb-07 21:30 
GeneralRe: Help regarding Webbrowser control Pin
anu8125-Feb-07 23:21
anu8125-Feb-07 23:21 
GeneralRe: Help regarding Webbrowser control Pin
anu8125-Feb-07 23:25
anu8125-Feb-07 23:25 
QuestionWPF Carousel ? Pin
zapsolution22-Feb-07 19:08
zapsolution22-Feb-07 19:08 
AnswerRe: WPF Carousel ? Pin
tgrt23-Feb-07 3:46
tgrt23-Feb-07 3:46 
QuestionCreating a VOIP call center Pin
Goalie3522-Feb-07 18:22
Goalie3522-Feb-07 18:22 
QuestionC# Regular expression Pin
tansey422-Feb-07 18:12
tansey422-Feb-07 18:12 
AnswerRe: C# Regular expression Pin
tgrt23-Feb-07 4:11
tgrt23-Feb-07 4:11 
QuestionRichtextbox gets cleared Pin
Dominic Victor22-Feb-07 17:17
Dominic Victor22-Feb-07 17:17 

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.