更新:2007 年 11 月

错误消息

扩展方法的第一个参数的类型不能为“type”。

扩展方法的第一个参数不能为指针类型。

示例

下面的示例生成 CS1103:

 复制代码
// cs1103.cs
public static class Extensions
{
    public unsafe static char* Test(this char* charP) { return charP; } // CS1103
} 

请参见

参考

扩展方法(C# 编程指南)
unsafe(C# 参考)