Reputation: 26397
I have an NSUrl object and want to read the file name. While searching for existing solutions on StackOverflow I found https://stackoverflow.com/a/19964302/25282 which is for iOS but it uses syntax like return [yourURL lastPathComponent];
where it is unclear to me how to translate it into the C# that I have to use in Xamarin.iOS.
Upvotes: 0
Views: 544
Reputation: 89127
the equivalent C# for this Obj-C code
return [yourURL lastPathComponent];
is
return yourURL.LastPathComponent;
where yourURL
is a NSUrl
;
Upvotes: 2