What is the difference between a C # interface and an Objective-C protocol?

What is the difference between the C # interface and the Objective-C protocol? I ask because I'm immersed in ASP.NET MVC, and I'm trying to understand some of the new concepts, and this will help if I can connect them with my Objective-C iOS programming background.

Thank you for your help!

+2
source share
1 answer

They are basically the same. However, in Objective-C 2.0 you can mark some methods in the protocol as "optional" (using the @optional qualifier), which means that classes that implement the protocol are not required to implement these methods.

+7
source

Source: https://habr.com/ru/post/970332/


All Articles