Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Formatting the .ToString() function
PostPosted: Wed Dec 03, 2014 12:19 pm 

Joined: Thu Nov 14, 2013 12:14 pm
Posts: 14

Offline
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?


 Profile  
 
 Post subject: Re: Formatting the .ToString() function
PostPosted: Tue Jan 06, 2015 8:15 am 

Joined: Mon Jun 11, 2012 2:10 pm
Posts: 89

Offline
What is the type of myValue? different types support different formats.

If myValue is a tag, you need to specify
Code:
string hex = Globals.Tags.myValue.Value.ToString("X2");

_________________
Adam M.
Controls Engineer
FlexEnergy


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: