|
|
|
|
|
by thelastguy
3948 days ago
|
|
Even in your "name = GetFullName();" example, there is still have the problem of not knowing if object being returned is a Name object, or, a string, because that method could have still returned an object of Name type, which will have different methods from an object of string type. And then the compiler complained when you try to pass the Name object into a method that takes a string type, thinking that the Name object is a string. Of course, as a programmer, you're suppose to read all the documentations, etc. But the reason C# is attractive to me is the productivity gained in ability to read source code very fast, due to the fact that C# enforced types, making it very easy for me to know what type an object is at first glance, without having to rely on Intellisence, even when the other programmers named their methods badly. |
|