Page 1 of 1

Formatting the .ToString() function

Posted: Wed Dec 03, 2014 12:19 pm
by onedumbtrucker
Hi All,

Was wondering if I am missing something here. I should be able to format the .ToString() function like this;

myValue.ToString("X2"); //Format value as hexidecimal with two digits

but for some reason iX developer will not allow it. Is this a namespace I have missed?

Re: Formatting the .ToString() function

Posted: Tue Jan 06, 2015 8:15 am
by AMitchneck
What is the type of myValue? different types support different formats.

If myValue is a tag, you need to specify

Code: Select all

string hex = Globals.Tags.myValue.Value.ToString("X2");