Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 byte[] 上写一个扩展方法。那可能吗?
是的,只需这样做:
public static class Extensions { public static void Method(this byte[] current) { } }
当然,只需制作 type 的第一个参数byte[]。
byte[]