I haven't written a blog post for a long time, and I haven't written much since I got it. I think it's good to introduce a tips today.
To extend a class, a method can be written under another class, but this class must be a static class. The following is a simple implementation.
First, you must have your own extended class. I just wrote it to implement this extended method function.
/// <Summary>
/// Class of the method to be extended
/// </Summary>
Public class ExClass
{
}
With the class to be extended, you need to write the extension method later. I still think it looks nice.
650) this. width = 650; "src =" http://img1.51cto.com/attachment/201307/105918328.jpg "title =" Capture. JPG "/>
In this way, you will be given an extension method for the class of the extension method, but I tried it. This class must be static. You can try it. If not, you can return it to me, everyone makes common progress.
The next step is to call the Main function.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/205R31427-1.jpg "title =" Capture. JPG "/>
In this case, OK. I hope you will be able to learn more if you don't know.
This article from the "life pursuit" blog, please be sure to keep this source http://hacjj.blog.51cto.com/3843027/1242883