Extension methods must be defined in a non-generic static class
change to Following points need to be considered when creating an extension method: The class which defines an extension method must be non-generic, static and non-nested Every extension method must be a static method The first parameter of the extension method should use the this keyword.