Another C# question

taximania

Well-Known Member
Licensed User
Longtime User
In my MsgLib code I have this snippet. Below.
Everything I've found on google says it should work.
Every convert type, UTF8, ASCII etc doesn't work.
Basic4ppc throws the error.
B4X:
Method not found.
GetString
System.Text.Encoding.
Continue?
B4X:
public string GetMsgBody(int Num)
{
   byte[] b = Convert.FromBase64String(msg[Num].Body);
        string str = System.Text.Encoding.UTF8.GetString(b);
       return str;
}

I know WinMo 5 and 6 devices handle different message.body 's differently.
ASCII, HTML, MIME etc
But surely there's a way to convert either type to ASCII.
That way I could parse the string using Basic4ppc functions.
 

taximania

Well-Known Member
Licensed User
Longtime User
Cheers for that Agraham. Nice pointer :) Still don't work :sign0148:
Leave it for now it now mate. 'Till I ask another question :sign0137:

Every msg.body has it's own properties. And needs to be converted accordingly. I'll get there. I usually do ;-)
 
Top