Code Playground | Sololearn: Learn to code for FREE!


Code Playground

I'm trying to use the Convert.ToHexString() Method [] but I keep getting an error saying 'Convert' doesn't have a ToHexString method?


4/5/2022 10:21:24 PM


5 Answers

New Answer


What's your C# compiler version? returns here on Sololearn: C# Compiler Version v4.0.30319 C# 1.0 released with .NET 1.0 C# 1.2 (bizarrely enough); released with .NET 1.1 C# 2.0 released with .NET 2.0 C# 3.0 released with .NET 3.5 C# 4.0 released with .NET 4 <<<<< We're here C# 5.0 released with .NET 4.5 C# 6.0 released with .NET 4.6 C# 7.0 released with .NET 4.6.2 C# 7.3 released with .NET 4.7.2 C# 8.0 released with NET Core 3.0 C# 9.0 released with NET 5.0 << if I understand it correctly toHexString was introduced here C# 10.0 released with NET 6.0 << your link points at this version. The link states under the function's description: "Applies to .NET 7 Preview 1 and other versions Product Versions .NET 5, 6, 7 Preview 1" I guess you're just trying to use a function that isn't implemented in the version used here.


I don't see where you used it in your Hex Test code.


Did you use system?


William Owens Yes, I got it to work in visual studio. Just not in the code area on here


Ahh I didn't even think about checking that