- Sep 23, 2003
- 11,449
- 264
- 126
Unfortunately I'm transitioning from a dead language, but into a great one learning - C#!
I feel like I'm learning concepts fairly quickly since I've only done a few hours of development. Afterall, learning one language does cover many BIG hurdles.
One question I find myself asking is why do types have methods? I can understand properties, but not methods. Why aren't these methods tied to the variables?
Example is string. Why is string.IsNullOrEmpty not tied to the string variables? You get great functions like Trim(), Contain(), etc - but they chose IsNullOrEmpty to be tied to the type.
What's the reasoning behind this? It makes me feel like I'm missing a very basic concept of the language.
Also any other tips on how I should view the language would be great!
I feel like I'm learning concepts fairly quickly since I've only done a few hours of development. Afterall, learning one language does cover many BIG hurdles.
One question I find myself asking is why do types have methods? I can understand properties, but not methods. Why aren't these methods tied to the variables?
Example is string. Why is string.IsNullOrEmpty not tied to the string variables? You get great functions like Trim(), Contain(), etc - but they chose IsNullOrEmpty to be tied to the type.
What's the reasoning behind this? It makes me feel like I'm missing a very basic concept of the language.
Also any other tips on how I should view the language would be great!