 <p>Actually, a method with signature <code>public static Image LoadImage(string path</code> isn't even an extension. It is just a static method, therefore to write this as you would like it simply change the class name:</p> <pre><code>public static class Image { public static Image LoadImage(string path) { using (MemoryStream ms = new MemoryStream(File.ReadAllBytes(path))) return Image.FromStream(ms); } } </code></pre>