Xamarin.ios Monotouch NSTextStorage实现如何

Xamarin.ios Monotouch NSTextStorage实现如何,xamarin.ios,nstextstorage,Xamarin.ios,Nstextstorage,我正在尝试将一些目标c代码移植到c# 头文件包含 @interface MyStorage : NSTextStorage @end 而实现类似于 #import "MyStorage .h" @interface MyStorage () @property (nonatomic,strong) NSMutableAttributedString *myAttrString; - (id)init { if (self = [super init]) { _myAt

我正在尝试将一些目标c代码移植到c# 头文件包含

@interface MyStorage : NSTextStorage
@end
而实现类似于

#import "MyStorage .h"
@interface MyStorage ()
@property (nonatomic,strong) NSMutableAttributedString *myAttrString;
- (id)init
{
    if (self = [super init]) {

        _myAttrString= [NSMutableAttributedString new];

    }
    return self;
}
- (NSString *)string
{
    return [_myAttrString string];
}
但是我不能理解这个问题

- (NSString *)string
{
    return [_myAttrString string];
}

部分。我认为这是一个抽象属性或类似的东西,但我不知道如何在c#上重写它,有人知道这是什么吗?

NSAttributedString.Value属性保存字符串的文本内容。这就是你要找的吗

谢谢你的回复Larry但我在搜索可重写的方法和属性时找到了它, 它是:

所以,如果您在运行时遇到一些抽象错误,只需继续查找可重写的方法和属性:)

public override IntPtr LowLevelValue {
            get {
                return _myAttrString.LowLevelValue;
            }
        }