using Foundation; // Create an NSIndexPath object with one level var indexPath = NSIndexPath.Create(0, 2); // The resulting object represents the third item // in the first section (section 0, row 2)
using Foundation; // Create an NSIndexPath object with two levels var indexPath = NSIndexPath.Create(1, 3, 2); // The resulting object represents the third item // in the fourth sub-item of the second item // (section 1, row 3, item 2)These examples use the System.Runtime.CompilerServices.Unsafe NuGet package, which provides a set of low-level APIs that can be used to create and manipulate unmanaged objects. The C# NSIndexPath class is part of the Xamarin.iOS framework, which is a set of tools and libraries that allow for the development of iOS applications using C# and .NET.