Dim A As String = Chr(128)
- Put this line in a VB.Net DLL
- Call it from a VB program -->> it works fine.
- Call it from a C# program -->> "No data is available for encoding 1252. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method." err.Number 13
Vb accepts 0 to 255 as acceptable values for Chr() but C# breaks the code with a fatal error if the value is above 127.
Why? Why does C# break the code inside the VB.Net DLL?
What other VB functions are affected by C#?
========== Thanks to Charlyface for asking me to add the full exception message. I had been looking at the error the DLL was raising in C# but not the one in VB. The error has given me an idea for the solution...