How to convert characters to ascii code?

How to convert characters to ascii code?
computing noob here

1 Like

Hey @ishankakar

You can convert character to ascii by using Encoding.ASCII.GetBytes(yourString)
it will return a byte array.

For your reference:
Single_char_Ascii_Sample.xaml (5.4 KB)

String_ascii_conversion.xaml (7.1 KB)

Regards…!!
Aksh

3 Likes

Thank you for helping me out

Hi Akshy,
Whatever you have done in above example it’s convert the string into Hexa Value not ascii value. Check the below link.
FYI…
http://onlinecalculators.brainmeasures.com/Conversions/StringtoAsciiCalculator.aspx

Suggest me if i am wrong.

Hey @vivekvivid21

Yeah noticed… There was a little mistake at my end I have put item.Tostring(“X”) so that is why you are getting Hexadecimal values, Due to that Hexadecimal Format Specifier.

So if you will remove X then it will work as expected.

Updating it :slight_smile:

Let me know.

Regards…!!
Aksh

Thanks Man

It’s working fine :slight_smile:

Vivek

How do you add the Encoding.ASCII package UiPath (probably a noob question) ? This seems like exactly what I need @aksh1yadav @vivekvivid21 Thanks for any help you can give !

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.