Extension methods not allowed in nested static classes?
问题 Why is this? I would find it really nice to be able to have some extension methods locked down to be used only within one of my classes. Don't really want to have certain extension methods available everywhere... and they look so much nicer than regular static methods :P For clarification: The reason I want these extension methods is because I am extending a Form, which has a DataGridView on it. And I am getting very tired of lines like these: foreach(var row in grid.Rows.OfType