Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Foundation/NSArray_1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ internal NSArray (NativeHandle handle) : base (handle)
{
}

static public NSArray<TKey>? FromNSObjects (params TKey [] items)
static public NSArray<TKey> FromNSObjects (params TKey [] items)
{
if (items is null)
throw new ArgumentNullException (nameof (items));

return FromNSObjects (items.Length, items);
}

static public NSArray<TKey>? FromNSObjects (int count, params TKey [] items)
static public NSArray<TKey> FromNSObjects (int count, params TKey [] items)
{
if (items is null)
throw new ArgumentNullException (nameof (items));
Expand All @@ -71,7 +71,7 @@ internal NSArray (NativeHandle handle) : base (handle)
Marshal.WriteIntPtr (buf, (int) (i * IntPtr.Size), h);
}
IntPtr ret = NSArray.FromObjects (buf, count);
var arr = Runtime.GetNSObject<NSArray<TKey>> (ret);
var arr = Runtime.GetNSObject<NSArray<TKey>> (ret)!;
Marshal.FreeHGlobal (buf);
return arr;
}
Expand Down