I read a couple of articles that say that with the introduction of named arguments in C# 3.0, the name of parameters are now part of the public contract. Is this true, and what does it mean exactly? I ran a simple test and changing a parameter name in MyLib.dll did not break MyApp.exe which called the method using a named argument with the original name, I think because the C# compiler did overload resolution at compile time, and the generated IL knows nothing about the parameter name. This is what the disassembled code looks on Reflector:
private static void Main()
{
bool CS$0$0000 = true;
Class1.DoSomething(CS$0$0000);
Console.ReadKey();
}
...and this is the original source code:
static void Main() {
MyLib.Class1.DoSomething(a: true);
Console.ReadKey();
}