.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Articles >> C# >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Objects in C#

Posted By:Shashi Ray       Posted Date: February 22, 2009    Points: 10    Category: C#    URL: http://www.dotnetspark.com  

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.


string s;

float x;

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.


Shashi Ray

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend