views:

34

answers:

4

hi all,

I am trying to convert VB6 code to c# and I ran into this code in VB6

#If ccDebug then
...
End If.

Please help me converting this code or doing this any other way.

Thanks

+1  A: 
if(ccDebug){
}

is the equivalent C# code.

Jamiec
He's got a # in front of the ccDebug, but StackOverflow thinks that's part of the markup, that's why it looks funny.
ho1
Ah didnt see that when I answered.
Jamiec
I just figured it out because I remembered seeing ccDebug before in some VB6 code for the same purpose before and then when I tried typing in #if it looked funny :).
ho1
+1  A: 

Maybe you need to use

#if DEBUG
        //do special stuff 
#endif
mdresser
+1  A: 

Almost the same if I understand your question correctly.

#if DEBUG
     ....
#endif

See this MSDN page for details.

ho1
+1  A: 

It is just a project wide constant, see this site for an example:

Example

You would be better off using

    #if DEBUG

    #endif
Longball27