Hacker News new | ask | show | jobs
by gnud 2457 days ago
Ah, the reason is simple: C# allows named parameters, but do not enforce them. You can call File.Copy both as

    File.Copy(a,b)
and

    File.Copy(sourceFileName: a, destFileName: b)
And confusingly, also as

    File.Copy(destFileName: b, sourceFileName: a)
1 comments

OK I see. That explains it and also gives a very concrete reason for using the chained API. Thanks.