function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

String Functions?

I am dealing with a lot of different types of fields including number (double) and date fields.  How can I convert the exact value of these fields into strings?
I am looking at the Apex Code Language Reference PDF, but I can't find anything in it.  Is there another more comprehensive Language Reference document some where?
Also I have Boolean, DateTime and Integer fields - there must be some easy method that can convert the values of each to a string.

This is really strange, say for example I have a variable that is a double named currentValue.  This line of code throws an error:

String test = currentValue;

ERROR:Severity and Description Path Resource Location Creation Time Id
Illegal assignment from Double to String MyTest_Support/Packages myPackage.apex line 22 1171636386867 61

But this line of code does not throw an error:

String test= '' + currentValue;

what am I missing?

Sorry I ment to post this in the APEX CODE forum, sure with I could delete my own posts... I posted this in the correct forum now.