Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Some C# questions.
Message
From
05/01/2007 03:20:32
James Hansen
Canyon Country Consulting
Flagstaff, Arizona, United States
 
 
To
05/01/2007 01:22:16
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01181975
Message ID:
01182684
Views:
9
Generally speaking in the OOP world, things that look like a characteristic or "property" of an object, such as a string's length or a control's BackColor, are usually defined as properties. Things that act on an object, like an object's ToString (formatting) or a form's Close (closing), are usually defined as methods.

In the case of ToString, it also sometimes takes a parameter to set the formating for the conversion, so it doesn't really look like a property when referenced that way.

...Jim

>
>You know whats freaking me out about C# right now?
>It's that user define variables come with what seems like a built in function and properties like
>
>MyVariable.ToString();
>MyVariable.Length;
>
>
>But why is Length a property and ToString a function?
>
>Thanks folks.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform