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

C#

 
AnswerRe: I need a better aproach to this tree code. Pin
Robert Rohde7-Dec-06 7:32
Robert Rohde7-Dec-06 7:32 
GeneralRe: I need a better aproach to this tree code. Pin
gesox00111-Dec-06 2:07
gesox00111-Dec-06 2:07 
QuestionGeting variables from UserControl Pin
Muntyness7-Dec-06 6:10
Muntyness7-Dec-06 6:10 
AnswerRe: Geting variables from UserControl Pin
Robert Rohde7-Dec-06 6:16
Robert Rohde7-Dec-06 6:16 
GeneralRe: Geting variables from UserControl Pin
Muntyness7-Dec-06 6:36
Muntyness7-Dec-06 6:36 
GeneralRe: Geting variables from UserControl Pin
Robert Rohde7-Dec-06 7:27
Robert Rohde7-Dec-06 7:27 
GeneralRe: Geting variables from UserControl Pin
Muntyness7-Dec-06 8:16
Muntyness7-Dec-06 8:16 
QuestionSwitch Question Pin
mcd24247-Dec-06 5:55
mcd24247-Dec-06 5:55 
Hi All,

I am converting some of my vb.net code to c# and have run into a problem.

<br />
Select Case True<br />
   Case p.ParameterType Is GetType(String)<br />
      Response.Write("paramater is a string")<br />
End Select<br />


the code above works but when I try to convert to c# I get the error: A constant value is expected.

<br />
switch (true)<br />
      {<br />
         case pInfo.ParameterType == typeof(String): <br />
            Response.Write("is type of string");<br />
            break;<br />
            <br />
      }<br />

Is there any way to do this in c#?

thanks


tom
AnswerRe: Switch Question Pin
User 66587-Dec-06 6:00
User 66587-Dec-06 6:00 
AnswerRe: Switch Question Pin
Colin Angus Mackay7-Dec-06 6:05
Colin Angus Mackay7-Dec-06 6:05 
GeneralRe: Switch Question Pin
mcd24247-Dec-06 6:14
mcd24247-Dec-06 6:14 
GeneralRe: Switch Question Pin
Colin Angus Mackay7-Dec-06 6:18
Colin Angus Mackay7-Dec-06 6:18 
AnswerRe: Switch Question Pin
Robert Rohde7-Dec-06 6:19
Robert Rohde7-Dec-06 6:19 
GeneralRe: Switch Question Pin
Not Active7-Dec-06 6:27
mentorNot Active7-Dec-06 6:27 
GeneralRe: Switch Question Pin
Robert Rohde7-Dec-06 7:19
Robert Rohde7-Dec-06 7:19 
GeneralRe: Switch Question Pin
Not Active7-Dec-06 7:31
mentorNot Active7-Dec-06 7:31 
GeneralRe: Switch Question Pin
Robert Rohde7-Dec-06 7:46
Robert Rohde7-Dec-06 7:46 
QuestionDatabase Problem Pin
mfcuser7-Dec-06 5:34
mfcuser7-Dec-06 5:34 
AnswerRe: Database Problem Pin
Paul Conrad7-Dec-06 5:37
professionalPaul Conrad7-Dec-06 5:37 
GeneralRe: Database Problem Pin
mfcuser7-Dec-06 5:50
mfcuser7-Dec-06 5:50 
GeneralRe: Database Problem Pin
Paul Conrad7-Dec-06 5:56
professionalPaul Conrad7-Dec-06 5:56 
GeneralRe: Database Problem Pin
mfcuser7-Dec-06 6:10
mfcuser7-Dec-06 6:10 
GeneralRe: Database Problem Pin
Colin Angus Mackay7-Dec-06 6:15
Colin Angus Mackay7-Dec-06 6:15 
AnswerRe: Database Problem Pin
Colin Angus Mackay7-Dec-06 6:12
Colin Angus Mackay7-Dec-06 6:12 
GeneralRe: Database Problem Pin
mfcuser7-Dec-06 6:27
mfcuser7-Dec-06 6:27 

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.