The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am having a problem converting one line of code in this VB.Net Function.
I have marked the line below in its context. In the converted C# code I am getting
a error stating "Input string was not in a correct format". Is there anyone out there
that can shed some light on fixing this line.. I have included the entire function so
that you may see the context.
The VB.Net line is : lChar = CInt("&H" & Mid(sMD5, (lCount * 2) - 1, 2)) Mod 32
The Converted C# is : lChar = Convert.ToInt32("&H" + Strings.Mid(sMD5, (lCount * 2) - 1, 2)) % 32;
Thanks for any help sent this way...
Steve Graddy
orgbrat@orgbrat.com
Just in case anyone was interested, here is the solution:
lChar = Convert.ToInt32(Strings.Mid(sMD5, (lCount * 2) - 1, 2),16) %32;
The key was adding the 16 format specifier.
>I am having a problem converting one line of code in this VB.Net Function.
>I have marked the line below in its context. In the converted C# code I am getting
>a error stating "Input string was not in a correct format". Is there anyone out there
>that can shed some light on fixing this line.. I have included the entire function so
>that you may see the context.
>
>The VB.Net line is : lChar = CInt("&H" & Mid(sMD5, (lCount * 2) - 1, 2)) Mod 32
>
>The Converted C# is : lChar = Convert.ToInt32("&H" + Strings.Mid(sMD5, (lCount * 2) - 1, 2)) % 32;
>
>Thanks for any help sent this way...
>
>Steve Graddy
>orgbrat@orgbrat.com