Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting this line to VB.NET
Message
From
20/08/2006 01:02:31
 
 
To
19/08/2006 22:48:04
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01147027
Message ID:
01147069
Views:
23
Michel,

Your first post had this C# code:
sbRet.Append( expr, pos++, 1 );
Now, if I were to change that to VB, I'd write:
sbRet.Append( expr, pos+1, 1 )
(I don't know if VB supports the ++, which simply means to add 1)

But, you posted this as the VB translation:
loStringBuilder.Append(tcSearchIn, System.Math.Min(System.Threading.Interlocked.Increment(lnLocation), lnLocation - 1), 1)
If you've simply changed the variables from your original post (and that's why it looks so different), then I would think the following, much simpler code, would work just fine:
loStringBuilder.Append(tcSearchIn, lnLocation + 1, 1)
Will that work for you?

~~Bonnie


>>Wow ... those two don't even look remotely the same. What's with the System.Math and the System.Threading stuff? No mention of those in your C# version ....
>
>I tried several converters and they all chocked on that line. Later on, I found one that came up with that line. It does the job. I just don't understand it however. :)
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform