ExportAttribute 类 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将方法或属性导出到 Objective-C 世界。
[System.AttributeUsage(System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property)]
public class ExportAttribute : Attributetype ExportAttribute = class
    inherit Attribute- 继承
- 
				ExportAttribute
- 派生
- 属性
注解
此属性应用于派生自 NSObject 的类中的属性和方法,以将值导出到 Objective-C 世界。 这可用于响应消息或替代 Objective-C 方法。
public class Test : SomeBaseClass {
    [Export ("setText:withFont:")]
    public void SetText (string text, string font)
    {
    }
}
构造函数
| ExportAttribute() | 使用此方法可将 C# 方法、属性或构造函数公开为可从 Objective-C 调用的方法。 | 
| ExportAttribute(String) | 将给定的方法或属性导出到具有指定方法名称的 Objective-C land。 | 
| ExportAttribute(String, ArgumentSemantic) | 使用此方法可将 C# 方法、属性或构造函数公开为可从 Objective-C 调用的方法。 | 
属性
| ArgumentSemantic | setter 属性或方法上的对象所有权的语义。 | 
| IsVariadic | 将方法或属性导出到 Objective-C 世界。 | 
| Selector | C# 选择器的名称(如果已指定),如果派生自属性名称或方法,则为 null。 | 
方法
| ToGetter(PropertyInfo) | 将方法或属性导出到 Objective-C 世界。 | 
| ToSetter(PropertyInfo) | 将方法或属性导出到 Objective-C 世界。 |