need C# conversion to VB.NET VS2005

  • Thread starter Rob R. Ainscough
  • 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.
 
G

Gabriel Magaña

ckey.SetValue("Type", CType(ckey.GetValue("Type")) | 0x100, Integer)

??
 
G

Gabriel Magaña

Sorry, brain fart... Try this:

ckey.SetValue("Type", CType(ckey.GetValue("Type"), Integer) | 0x100)
 
G

Gabriel Magaña

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...
 
G

Guest

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
 
K

Kevin Spencer

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.
 
R

Rob R. Ainscough

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top