Hello,
You cannot use .NET keywords reliably on Monobjc wrappers (as they are
wrappers around native pointers). If you want to cast (safely or not),
use the CastAs<T>() and CastTo<T>() methods:
args.objectAtIndex(0).CastAs<NSString>().
Regards, Laurent Etiemble.
2008/11/25 yoni shalom <[EMAIL PROTECTED]>:
> managed class contains :
>
> [ObjectiveCMessage("func:")]
> public Id InvokeApplication(NSArray args)
> {
> Console.WriteLine(args.objectAtIndex(0) is NSString);
> }
>
> There is a call from objective c to this function, using an NSArray which
> contains an NSString.
>
> if that NSString in objective-c is an empty string (i.e. ""), the result of
> running this code is "true"
> if that NSString in objective-c isn't empty (i.e. "bla"), the result of
> running this code is "false", which in my scenario is a problem.
>
> Any suggestions? Workarounds?
>