I want a similar Encoding.UTF8.GetBytes() in c# Lang to AL Business central
I tried it but it was useless codeunit "Base64 Convert" Base64Convert.ToBase64() I tried to convert c sharp code to AL because can't attach dll in sandbox thank you so much
I want a similar Encoding.UTF8.GetBytes() in c# Lang to AL Business central
I tried it but it was useless codeunit "Base64 Convert" Base64Convert.ToBase64() I tried to convert c sharp code to AL because can't attach dll in sandbox thank you so much
I haven't had a use case for this yet. You may find what you are looking for in the codeunit 3026 DotNet_Encoding. Since we are not allowed to use DotNet objects in SaaS, the codeunits with the "DotNet_" prefix act as wrappers so that we can still execute the DotNet functionality via these wrapper codeunits. The following example may not be exactly what you are looking for. It is simply an example to give you an idea of what the DotNet_Encoding codeunit contains:
As far as I can see the codeunit only accepts an array of chars for now. I have not found a function that allows me to retrieve bytes from a string. Check out the Codeunit DotNet_Encoding for more details. If you are missing a function, you can report an idea via https://aka.ms/bcideas.