Hi Fathin,
Thanks for your code.
The “Rectangle” is key of feature but not its id, so the code should looks like:
inMemoryLayer.Open();
inMemoryLayer.EditTools.BeginTransaction();
inMemoryLayer.EditTools.Delete(inMemoryLayer.InternalFeatures["Rectangle"].Id);
inMemoryLayer.EditTools.CommitTransaction();
inMemoryLayer.Close();
And if you upload the sample, you don’t need package the “packages” and “bin” and “obj” folders.
Regards,
Ethan