0
The problem is in the following description :
CS1061 error
"string" does not contain a definition for "Containsignorecase" and was not can find no method of extension "Containsignorecase" that accept a first "string" argument (there is a usage directive or missing Assembly reference?)
I created an Extension there at the beginning in a public Static, but it didn’t help.. What else can I do?
Error happens in [Step 2.1]
namespace MyMethod
{
public static class MyExtensions
{
public static bool ContainsIgnoreCase(this string source, string search)
{
return source.IndexOf(search, StringComparison.CurrentCultureIgnoreCase) >= 0;
}
}
}
Use
private void txtBuscarJogo_TextChanged(object sender, EventArgs
{
var controles = _todosBotoes.Where(btnArcheAge => (btnArcheAge.Tag as String ?? btnArcheAge.Text).ContainsIgnoreCase(txtBuscarJogo.Text)).ToArray();
//Passo 2.2
mainPanel.Controls.Clear();
//Passo 2.3
mainPanel.Controls.AddRange(controles);
}
Do not use images, paste the error message text.
– Jéf Bueno
Also take care of code formatting, the harder it is to read, the fewer people willing to help.
– Jéf Bueno