What does "remove assignment" prompt mean in my lambda expression?
I have a R# prompt saying that I should "remove assignment" graying "message =".
public static void ThrowIfNullOrEmpty(string[] names, string[] values, string commonMessage)
{
var messages = new string[names.Length];
// initialize all elements of array with the common string message;
Array.ForEach(messages, message => message = commonMessage);
ThrowIfNullOrEmpty(names, values, messages);
}
]]>Could anybody help me what does it mean and why should I remove that?
Thanks in advance,
Lukasz
Please sign in to leave a comment.