Hacker News new | past | comments | ask | show | jobs | submit login

I don't know C#, but in most languages I know, this string.left(n) method is just equivalent to string.substring(0, n).



Actually, string.Substring(0, n) is also the C# idiom. The orignial blogger is essentially creating a method alias Left(n) => Substring(0, n), which IMO is not a good use for extension methods.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: