need C# conversion to VB.NET VS2005

  • Thread starter Thread starter Rob R. Ainscough
  • Start date Start date
R

Rob R. Ainscough

I've tried several online C# to VB.NET converters but none have produce
valid output.

C#
ckey.SetValue("Type", (int)ckey.GetValue("Type") | 0x100);

the converts show:
ckey.SetValue("Type", CType(ckey.GetValue("Type") | 0x100, Integer))

This not a correct conversion, can anyone give me the equivalent VB.NET code
for VS 2005?

thanks, Rob.
 
Sorry, brain fart... Try this:

ckey.SetValue("Type", CType(ckey.GetValue("Type"), Integer) | 0x100)
 
Yet another brain fart, I think you have to replace the "|" with "or" and
replace 0x100 with 256 (which is the decimal equivalent). Hopefully there
are not more ways I could mess up one line of code...
 
Our Instant VB C# to VB converter produces:
ckey.SetValue("Type", CInt(ckey.GetValue("Type")) Or &H100)

(btw, we have a free demo edition)
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter & VB to C++ converter
Instant J#: VB to J# converter
 
ckey.SetValue("Type", CType(ckey.GetValue("Type"), Integer) Or &H100)

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.
 
David,

thank you!

Rob.

David Anton said:
Our Instant VB C# to VB converter produces:
ckey.SetValue("Type", CInt(ckey.GetValue("Type")) Or &H100)

(btw, we have a free demo edition)
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter & VB to C++ converter
Instant J#: VB to J# converter
 
Back
Top