Objects in C#
In C#, everything is treated as an object. Objects contain data and have methods that operate on them. For example, strings are now objects. They have methods such as
and so forth.
Integers, float and double variables are also objects, and have methods.
x = 12.3;
s = x.ToString();
Note that conversion from numerical types is done using these methods rather than external functions. If you want to format a number as a particular kind of string, each numeric type has a Format method.