1. Saul Erhmy
  2. PowerScript Migrator
  3. Wednesday, 5 October 2022 18:53 PM UTC

Hi,

I have another question on how to translate a PB function to C#. The powerbuilder function I want to translate is String(blob, EncodingANSI!), I added the Description for the function. In C#, I have the "blob" defined as byte[] Buffer. My goal is to turn "Buffer" into a string, which can be done with Buffer.ToString() i think, but I am not sure how to incorporate the EncodingANSI!. 

Marco Meoni Accepted Answer Pending Moderation
  1. Wednesday, 5 October 2022 20:48 PM UTC
  2. PowerScript Migrator
  3. # 1

Hi Saul,

 

Have you tried with PowerScript.Bridge?

https://docs.appeon.com/powerscript_bridge/1.0.4/api_reference/PowerScript.Bridge/PowerScript.Bridge.html

PScript converter suggests this equivalent code:

PbBlob lblb; // your blob       
ls_a = lblb.ToString(Encoding.ASCII);

Best,

.m

Comment
  1. Saul Erhmy
  2. Wednesday, 5 October 2022 21:09 PM UTC
I have tried that and I get thrown this error. CS1501 No overload for method 'ToString' takes 1 arguments
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.